Clearly we should be using the loop counter j, not loop bound i
in the cleanup loop there.
Change-Id: I84a682846e7bdfc93786ab47ea3c0603f2849860
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/22635
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
/* Indices 0 to i (excluding i) were correctly initialized,
* thus we must uninitialize up to i, the rest are undefined. */
for (j = 0; j < i; j++) {
- cle = &cl_env_percpu[i];
+ cle = &cl_env_percpu[j];
lu_context_exit(&cle->ce_ses);
lu_context_fini(&cle->ce_ses);
lu_env_fini(&cle->ce_lu);