提交 5d57bd39 编写于 作者: M Matt Mackall 提交者: Linus Torvalds

[PATCH] Error checks omitted in init_tmpfs() in mm/tiny-shmem.c

From: Hareesh Nagarajan <hnagar2@gmail.com>
Signed-off-by: NHareesh Nagarajan <hnagar2@gmail.com>
Acked-by: NMatt Mackall <mpm@selenic.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a3e713b5
...@@ -31,11 +31,14 @@ static struct vfsmount *shm_mnt; ...@@ -31,11 +31,14 @@ static struct vfsmount *shm_mnt;
static int __init init_tmpfs(void) static int __init init_tmpfs(void)
{ {
register_filesystem(&tmpfs_fs_type); BUG_ON(register_filesystem(&tmpfs_fs_type) != 0);
#ifdef CONFIG_TMPFS #ifdef CONFIG_TMPFS
devfs_mk_dir("shm"); devfs_mk_dir("shm");
#endif #endif
shm_mnt = kern_mount(&tmpfs_fs_type); shm_mnt = kern_mount(&tmpfs_fs_type);
BUG_ON(IS_ERR(shm_mnt));
return 0; return 0;
} }
module_init(init_tmpfs) module_init(init_tmpfs)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册