Whamcloud - gitweb
LU-8629 obdclass: Fix error exit loop in cl_env_percpu_init 35/22635/4
authorSandhya Bankar <bankarsandhya512@gmail.com>
Tue, 20 Sep 2016 16:03:42 +0000 (12:03 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 26 Sep 2016 15:18:46 +0000 (15:18 +0000)
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>
lustre/obdclass/cl_object.c

index 3a4635f..c2e045b 100644 (file)
@@ -911,7 +911,7 @@ static int cl_env_percpu_init(void)
                /* 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);