module_refcount() is not available when CONFIG_MODULE_UNLOAD is off.
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Peng Tao <[email protected]>
Signed-off-by: Andreas Dilger <[email protected]>
---
drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c
b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index 22b247d..fdf0ed3 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -1351,7 +1351,9 @@ static void key_fini(struct lu_context *ctx, int index)
LASSERT(key->lct_owner != NULL);
if ((ctx->lc_tags & LCT_NOREF) == 0) {
+#ifdef CONFIG_MODULE_UNLOAD
LINVRNT(module_refcount(key->lct_owner) > 0);
+#endif
module_put(key->lct_owner);
}
ctx->lc_value[index] = NULL;
--
1.7.9.5
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel