ramfs: fix double freeing s_fs_info on failed mount
authorIngo Molnar <mingo@elte.hu>
Tue, 7 Apr 2009 06:16:50 +0000 (14:16 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2009 14:39:59 +0000 (07:39 -0700)
If ramfs mount fails, s_fs_info will be freed twice in ramfs_fill_super()
and ramfs_kill_sb(), leading to kernel oops.

Consolidate and beautify the code.
Make sure s_fs_info and s_root are in known good states.

Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found