Whamcloud - gitweb
LU-8888 clio: remove unused members from struct cl_thread_info
[fs/lustre-release.git] / lustre / obdclass / cl_object.c
index 3a4635f..4087020 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -27,7 +23,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -911,7 +907,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);
@@ -1026,20 +1022,8 @@ struct cl_thread_info *cl_env_info(const struct lu_env *env)
         return lu_context_key_get(&env->le_ctx, &cl_key);
 }
 
-/* defines cl0_key_{init,fini}() */
-LU_KEY_INIT_FINI(cl0, struct cl_thread_info);
-
-static void *cl_key_init(const struct lu_context *ctx,
-                         struct lu_context_key *key)
-{
-       return cl0_key_init(ctx, key);
-}
-
-static void cl_key_fini(const struct lu_context *ctx,
-                        struct lu_context_key *key, void *data)
-{
-       cl0_key_fini(ctx, key, data);
-}
+/* defines cl_key_{init,fini}() */
+LU_KEY_INIT_FINI(cl, struct cl_thread_info);
 
 static struct lu_context_key cl_key = {
         .lct_tags = LCT_CL_THREAD,