lu_context_key_quiesce(key);
++key_set_version;
+ spin_lock(&lu_keys_guard);
key_fini(&lu_shrink_env.le_ctx, key->lct_index);
if (atomic_read(&key->lct_used) > 1)
CERROR("key has instances.\n");
- spin_lock(&lu_keys_guard);
lu_keys[key->lct_index] = NULL;
spin_unlock(&lu_keys_guard);
}
{
int i;
+ spin_lock(&lu_keys_guard);
if (ctx->lc_value != NULL) {
for (i = 0; i < ARRAY_SIZE(lu_keys); ++i)
key_fini(ctx, i);
ARRAY_SIZE(lu_keys) * sizeof ctx->lc_value[0]);
ctx->lc_value = NULL;
}
+ spin_unlock(&lu_keys_guard);
}
static int keys_fill(struct lu_context *ctx)