diff options
Diffstat (limited to 'fs/proc/proc_sysctl.c')
-rw-r--r-- | fs/proc/proc_sysctl.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index a492ff60e071..e573f9b4f22e 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -218,16 +218,6 @@ static int sysctl_perm(struct ctl_table_root *root, struct ctl_table *table, int | |||
218 | return test_perm(mode, op); | 218 | return test_perm(mode, op); |
219 | } | 219 | } |
220 | 220 | ||
221 | static void sysctl_set_parent(struct ctl_table *parent, struct ctl_table *table) | ||
222 | { | ||
223 | for (; table->procname; table++) { | ||
224 | table->parent = parent; | ||
225 | if (table->child) | ||
226 | sysctl_set_parent(table, table->child); | ||
227 | } | ||
228 | } | ||
229 | |||
230 | |||
231 | static struct inode *proc_sys_make_inode(struct super_block *sb, | 221 | static struct inode *proc_sys_make_inode(struct super_block *sb, |
232 | struct ctl_table_header *head, struct ctl_table *table) | 222 | struct ctl_table_header *head, struct ctl_table *table) |
233 | { | 223 | { |
@@ -947,10 +937,10 @@ struct ctl_table_header *__register_sysctl_table( | |||
947 | header->used = 0; | 937 | header->used = 0; |
948 | header->unregistering = NULL; | 938 | header->unregistering = NULL; |
949 | header->root = root; | 939 | header->root = root; |
950 | sysctl_set_parent(NULL, header->ctl_table); | ||
951 | header->count = 1; | 940 | header->count = 1; |
952 | if (sysctl_check_table(path, table)) | 941 | if (sysctl_check_table(path, table)) |
953 | goto fail; | 942 | goto fail; |
943 | |||
954 | spin_lock(&sysctl_lock); | 944 | spin_lock(&sysctl_lock); |
955 | header->set = lookup_header_set(root, namespaces); | 945 | header->set = lookup_header_set(root, namespaces); |
956 | header->attached_by = header->ctl_table; | 946 | header->attached_by = header->ctl_table; |