++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",
* Debugging printer function using printk().
*/
int lu_printk_printer(const struct lu_env *env,
- void *_, const char *format, ...)
+ void *unused, const char *format, ...)
{
va_list args;
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
} else {
unsigned char *small_befider;
+ /* as lower 24 bits of FID_SEQ_START are zero, no need to
+ * subtract its value from seq */
+
+ CLASSERT((FID_SEQ_START & 0xffffff) == 0);
+
small_befider = (unsigned char *)befider;
small_befider[0] = seq >> 16;