forked from Minki/linux
[PATCH] fat: fix slab cache leak
This patch plugs a slab cache leak in fat module initialization. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
9ec55a9bd3
commit
532a39a375
@ -1331,12 +1331,21 @@ void __exit fat_cache_destroy(void);
|
||||
|
||||
static int __init init_fat_fs(void)
|
||||
{
|
||||
int ret;
|
||||
int err;
|
||||
|
||||
ret = fat_cache_init();
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
return fat_init_inodecache();
|
||||
err = fat_cache_init();
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = fat_init_inodecache();
|
||||
if (err)
|
||||
goto failed;
|
||||
|
||||
return 0;
|
||||
|
||||
failed:
|
||||
fat_cache_destroy();
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit exit_fat_fs(void)
|
||||
|
Loading…
Reference in New Issue
Block a user