1 mbcache: don't BUG() if entry cache cannot be allocated
3 From: Eric Biggers <ebiggers@google.com>
5 mbcache can be a module that is loaded long after startup, when someone
6 asks to mount an ext2 or ext4 filesystem. Therefore it should not BUG()
7 if kmem_cache_create() fails, but rather just fail the module load.
9 Signed-off-by: Eric Biggers <ebiggers@google.com>
10 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 Reviewed-by: Jan Kara <jack@suse.cz>
14 1 file changed, 2 insertions(+), 1 deletion(-)
16 diff --git a/fs/mbcache.c b/fs/mbcache.c
17 index 31e54c2..c56ab21 100644
20 @@ -420,7 +420,8 @@ static int __init mbcache_init(void)
21 mb_entry_cache = kmem_cache_create("mbcache",
22 sizeof(struct mb_cache_entry), 0,
23 SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL);
24 - BUG_ON(!mb_entry_cache);
25 + if (!mb_entry_cache)
31 2.8.0.rc3.226.g39d4020
34 To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
35 the body of a message to majordomo@vger.kernel.org
36 More majordomo info at http://vger.kernel.org/majordomo-info.html