From cf5882e6d381c18ec07d53a38010fcf2eb0d754d Mon Sep 17 00:00:00 2001 From: Sandhya Bankar Date: Tue, 20 Sep 2016 12:03:42 -0400 Subject: [PATCH] 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 --- lustre/obdclass/cl_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.8.3.1