Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+5 -6
+1 -2
fs/proc/inode.c
··· 106 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 111 proc_inode_cachep = kmem_cache_create("proc_inode_cache", 112 112 sizeof(struct proc_inode), 113 113 0, (SLAB_RECLAIM_ACCOUNT| 114 114 SLAB_MEM_SPREAD|SLAB_PANIC), 115 115 init_once); 116 - return 0; 117 116 } 118 117 119 118 static const struct super_operations proc_sops = {
+1 -1
fs/proc/internal.h
··· 66 66 67 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 71 static inline struct pid *proc_pid(struct inode *inode) 72 72 {
+3 -3
fs/proc/root.c
··· 104 104 105 105 void __init proc_root_init(void) 106 106 { 107 - int err = proc_init_inodecache(); 108 - if (err) 109 - return; 107 + int err; 108 + 109 + proc_init_inodecache(); 110 110 err = register_filesystem(&proc_fs_type); 111 111 if (err) 112 112 return;