summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/mbcache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/mbcache.c b/fs/mbcache.c
index 31e54c25d16f..c56ab2164d6b 100644
--- a/fs/mbcache.c
+++ b/fs/mbcache.c
@@ -420,7 +420,8 @@ static int __init mbcache_init(void)
mb_entry_cache = kmem_cache_create("mbcache",
sizeof(struct mb_cache_entry), 0,
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL);
- BUG_ON(!mb_entry_cache);
+ if (!mb_entry_cache)
+ return -ENOMEM;
return 0;
}