diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-17 01:43:55 +0200 |
---|---|---|
committer | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-23 11:27:50 +0200 |
commit | 5bcd7ff9e1690dbdbccb2a1cb3c2ea8b8381c435 (patch) | |
tree | 4655120e76654512a1229bb4af0a41fb55c23663 /fs | |
parent | proc: fix vma display mismatch between /proc/pid/{maps,smaps} (diff) | |
download | linux-5bcd7ff9e1690dbdbccb2a1cb3c2ea8b8381c435.tar.xz linux-5bcd7ff9e1690dbdbccb2a1cb3c2ea8b8381c435.zip |
proc: proc_init_inodecache() can't fail
kmem_cache creation code will panic, don't return anything.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/inode.c | 3 | ||||
-rw-r--r-- | fs/proc/internal.h | 2 | ||||
-rw-r--r-- | fs/proc/root.c | 6 |
3 files changed, 5 insertions, 6 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index c6b4fa7e3b49..2543fd00c658 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -106,14 +106,13 @@ static void init_once(void *foo) inode_init_once(&ei->vfs_inode); } -int __init proc_init_inodecache(void) +void __init proc_init_inodecache(void) { proc_inode_cachep = kmem_cache_create("proc_inode_cache", sizeof(struct proc_inode), 0, (SLAB_RECLAIM_ACCOUNT| SLAB_MEM_SPREAD|SLAB_PANIC), init_once); - return 0; } static const struct super_operations proc_sops = { diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 3bfb7b8747b3..d5bf4dec6b0a 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h @@ -66,7 +66,7 @@ extern const struct inode_operations proc_net_inode_operations; void free_proc_entry(struct proc_dir_entry *de); -int proc_init_inodecache(void); +void proc_init_inodecache(void); static inline struct pid *proc_pid(struct inode *inode) { diff --git a/fs/proc/root.c b/fs/proc/root.c index 95117538a4f6..2a3abd25b30b 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -104,9 +104,9 @@ static struct file_system_type proc_fs_type = { void __init proc_root_init(void) { - int err = proc_init_inodecache(); - if (err) - return; + int err; + + proc_init_inodecache(); err = register_filesystem(&proc_fs_type); if (err) return; |