diff options
Diffstat (limited to 'fs/proc/root.c')
-rw-r--r-- | fs/proc/root.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index 64d242b6dcfa..5834a744c2a9 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
@@ -23,10 +23,6 @@ | |||
23 | 23 | ||
24 | struct proc_dir_entry *proc_net, *proc_net_stat, *proc_bus, *proc_root_fs, *proc_root_driver; | 24 | struct proc_dir_entry *proc_net, *proc_net_stat, *proc_bus, *proc_root_fs, *proc_root_driver; |
25 | 25 | ||
26 | #ifdef CONFIG_SYSCTL | ||
27 | struct proc_dir_entry *proc_sys_root; | ||
28 | #endif | ||
29 | |||
30 | static int proc_get_sb(struct file_system_type *fs_type, | 26 | static int proc_get_sb(struct file_system_type *fs_type, |
31 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 27 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) |
32 | { | 28 | { |
@@ -71,13 +67,6 @@ void __init proc_root_init(void) | |||
71 | #ifdef CONFIG_SYSVIPC | 67 | #ifdef CONFIG_SYSVIPC |
72 | proc_mkdir("sysvipc", NULL); | 68 | proc_mkdir("sysvipc", NULL); |
73 | #endif | 69 | #endif |
74 | #ifdef CONFIG_SYSCTL | ||
75 | proc_sys_root = proc_mkdir("sys", NULL); | ||
76 | #endif | ||
77 | #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE) | ||
78 | proc_mkdir("sys/fs", NULL); | ||
79 | proc_mkdir("sys/fs/binfmt_misc", NULL); | ||
80 | #endif | ||
81 | proc_root_fs = proc_mkdir("fs", NULL); | 70 | proc_root_fs = proc_mkdir("fs", NULL); |
82 | proc_root_driver = proc_mkdir("driver", NULL); | 71 | proc_root_driver = proc_mkdir("driver", NULL); |
83 | proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */ | 72 | proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */ |
@@ -90,6 +79,9 @@ void __init proc_root_init(void) | |||
90 | proc_device_tree_init(); | 79 | proc_device_tree_init(); |
91 | #endif | 80 | #endif |
92 | proc_bus = proc_mkdir("bus", NULL); | 81 | proc_bus = proc_mkdir("bus", NULL); |
82 | #ifdef CONFIG_SYSCTL | ||
83 | proc_sys_init(); | ||
84 | #endif | ||
93 | } | 85 | } |
94 | 86 | ||
95 | static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat | 87 | static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat |
@@ -136,7 +128,7 @@ static int proc_root_readdir(struct file * filp, | |||
136 | * <pid> directories. Thus we don't use the generic | 128 | * <pid> directories. Thus we don't use the generic |
137 | * directory handling functions for that.. | 129 | * directory handling functions for that.. |
138 | */ | 130 | */ |
139 | static struct file_operations proc_root_operations = { | 131 | static const struct file_operations proc_root_operations = { |
140 | .read = generic_read_dir, | 132 | .read = generic_read_dir, |
141 | .readdir = proc_root_readdir, | 133 | .readdir = proc_root_readdir, |
142 | }; | 134 | }; |
@@ -144,7 +136,7 @@ static struct file_operations proc_root_operations = { | |||
144 | /* | 136 | /* |
145 | * proc root can do almost nothing.. | 137 | * proc root can do almost nothing.. |
146 | */ | 138 | */ |
147 | static struct inode_operations proc_root_inode_operations = { | 139 | static const struct inode_operations proc_root_inode_operations = { |
148 | .lookup = proc_root_lookup, | 140 | .lookup = proc_root_lookup, |
149 | .getattr = proc_root_getattr, | 141 | .getattr = proc_root_getattr, |
150 | }; | 142 | }; |