Commit 532a39a3 authored by Pekka J Enberg's avatar Pekka J Enberg Committed by Linus Torvalds

[PATCH] fat: fix slab cache leak

This patch plugs a slab cache leak in fat module initialization.
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9ec55a9b
...@@ -1331,12 +1331,21 @@ void __exit fat_cache_destroy(void); ...@@ -1331,12 +1331,21 @@ void __exit fat_cache_destroy(void);
static int __init init_fat_fs(void) static int __init init_fat_fs(void)
{ {
int ret; int err;
ret = fat_cache_init(); err = fat_cache_init();
if (ret < 0) if (err)
return ret; return err;
return fat_init_inodecache();
err = fat_init_inodecache();
if (err)
goto failed;
return 0;
failed:
fat_cache_destroy();
return err;
} }
static void __exit exit_fat_fs(void) static void __exit exit_fat_fs(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment