From: Sandhya Bankar Date: Tue, 20 Sep 2016 16:03:42 +0000 (-0400) Subject: LU-8629 obdclass: Fix error exit loop in cl_env_percpu_init X-Git-Tag: 2.8.59~36 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=cf5882e6d381c18ec07d53a38010fcf2eb0d754d LU-8629 obdclass: Fix error exit loop in cl_env_percpu_init 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 Reviewed-on: http://review.whamcloud.com/22635 Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lustre/obdclass/cl_object.c b/lustre/obdclass/cl_object.c index 3a4635f..c2e045b 100644 --- a/lustre/obdclass/cl_object.c +++ b/lustre/obdclass/cl_object.c @@ -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);