Explorar o código

staging/lustre: surround module_refcount with CONFIG_MODULE_UNLOAD

module_refcount() is not available when CONFIG_MODULE_UNLOAD is off.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao %!s(int64=12) %!d(string=hai) anos
pai
achega
4a1a01ea52
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/staging/lustre/lustre/obdclass/lu_object.c

+ 2 - 0
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;