]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/mbcache.c
mbcache: don't BUG() if entry cache cannot be allocated
[karo-tx-linux.git] / fs / mbcache.c
index 31e54c25d16f97334a2aacc4435b3d9997a2c0f2..c56ab2164d6bc74d65cca5c4af86804572c7e067 100644 (file)
@@ -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;
 }