diff options
| author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-16 19:43:55 -0400 |
|---|---|---|
| committer | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-23 05:27:50 -0400 |
| commit | 5bcd7ff9e1690dbdbccb2a1cb3c2ea8b8381c435 (patch) | |
| tree | 4655120e76654512a1229bb4af0a41fb55c23663 | |
| parent | 7c88db0cb589df980acfb2f73c3595a0653004ec (diff) | |
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>
| -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) | |||
| 106 | inode_init_once(&ei->vfs_inode); | 106 | inode_init_once(&ei->vfs_inode); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | int __init proc_init_inodecache(void) | 109 | void __init proc_init_inodecache(void) |
| 110 | { | 110 | { |
| 111 | proc_inode_cachep = kmem_cache_create("proc_inode_cache", | 111 | proc_inode_cachep = kmem_cache_create("proc_inode_cache", |
| 112 | sizeof(struct proc_inode), | 112 | sizeof(struct proc_inode), |
| 113 | 0, (SLAB_RECLAIM_ACCOUNT| | 113 | 0, (SLAB_RECLAIM_ACCOUNT| |
| 114 | SLAB_MEM_SPREAD|SLAB_PANIC), | 114 | SLAB_MEM_SPREAD|SLAB_PANIC), |
| 115 | init_once); | 115 | init_once); |
| 116 | return 0; | ||
| 117 | } | 116 | } |
| 118 | 117 | ||
| 119 | static const struct super_operations proc_sops = { | 118 | 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; | |||
| 66 | 66 | ||
| 67 | void free_proc_entry(struct proc_dir_entry *de); | 67 | void free_proc_entry(struct proc_dir_entry *de); |
| 68 | 68 | ||
| 69 | int proc_init_inodecache(void); | 69 | void proc_init_inodecache(void); |
| 70 | 70 | ||
| 71 | static inline struct pid *proc_pid(struct inode *inode) | 71 | static inline struct pid *proc_pid(struct inode *inode) |
| 72 | { | 72 | { |
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 = { | |||
| 104 | 104 | ||
| 105 | void __init proc_root_init(void) | 105 | void __init proc_root_init(void) |
| 106 | { | 106 | { |
| 107 | int err = proc_init_inodecache(); | 107 | int err; |
| 108 | if (err) | 108 | |
| 109 | return; | 109 | proc_init_inodecache(); |
| 110 | err = register_filesystem(&proc_fs_type); | 110 | err = register_filesystem(&proc_fs_type); |
| 111 | if (err) | 111 | if (err) |
| 112 | return; | 112 | return; |
