Commit 4a1a01ea authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman

staging/lustre: surround module_refcount with CONFIG_MODULE_UNLOAD

module_refcount() is not available when CONFIG_MODULE_UNLOAD is off.
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4b5b4c72
...@@ -1351,7 +1351,9 @@ static void key_fini(struct lu_context *ctx, int index) ...@@ -1351,7 +1351,9 @@ static void key_fini(struct lu_context *ctx, int index)
LASSERT(key->lct_owner != NULL); LASSERT(key->lct_owner != NULL);
if ((ctx->lc_tags & LCT_NOREF) == 0) { if ((ctx->lc_tags & LCT_NOREF) == 0) {
#ifdef CONFIG_MODULE_UNLOAD
LINVRNT(module_refcount(key->lct_owner) > 0); LINVRNT(module_refcount(key->lct_owner) > 0);
#endif
module_put(key->lct_owner); module_put(key->lct_owner);
} }
ctx->lc_value[index] = NULL; ctx->lc_value[index] = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment