module_refcount() is not available when CONFIG_MODULE_UNLOAD is off. Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Signed-off-by: Peng Tao <tao.peng@xxxxxxx> Signed-off-by: Andreas Dilger <andreas.dilger@xxxxxxxxx> --- 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 devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel