++key_set_version;
spin_lock(&lu_keys_guard);
key_fini(&lu_shrink_env.le_ctx, key->lct_index);
- lu_keys[key->lct_index] = NULL;
+ if (lu_keys[key->lct_index]) {
+ lu_keys[key->lct_index] = NULL;
+ lu_ref_fini(&key->lct_reference);
+ }
spin_unlock(&lu_keys_guard);
LASSERTF(atomic_read(&key->lct_used) == 1, "key has instances: %d\n",
CDEBUG(D_CONSOLE, "Lustre LU module (%p).\n", &lu_keys);
+ result = lu_ref_global_init();
+ if (result != 0)
+ return result;
+
LU_CONTEXT_KEY_INIT(&lu_global_key);
result = lu_context_key_register(&lu_global_key);
if (result != 0)
if (result != 0)
return result;
- result = lu_ref_global_init();
- if (result != 0)
- return result;
/*
* seeks estimation: 3 seeks to read a record from oi, one to read
* inode, one for ea. Unfortunately setting this high value results in