|
@@ -218,16 +218,6 @@ static int sysctl_perm(struct ctl_table_root *root, struct ctl_table *table, int
|
|
|
return test_perm(mode, op);
|
|
|
}
|
|
|
|
|
|
-static void sysctl_set_parent(struct ctl_table *parent, struct ctl_table *table)
|
|
|
-{
|
|
|
- for (; table->procname; table++) {
|
|
|
- table->parent = parent;
|
|
|
- if (table->child)
|
|
|
- sysctl_set_parent(table, table->child);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
static struct inode *proc_sys_make_inode(struct super_block *sb,
|
|
|
struct ctl_table_header *head, struct ctl_table *table)
|
|
|
{
|
|
@@ -947,10 +937,10 @@ struct ctl_table_header *__register_sysctl_table(
|
|
|
header->used = 0;
|
|
|
header->unregistering = NULL;
|
|
|
header->root = root;
|
|
|
- sysctl_set_parent(NULL, header->ctl_table);
|
|
|
header->count = 1;
|
|
|
if (sysctl_check_table(path, table))
|
|
|
goto fail;
|
|
|
+
|
|
|
spin_lock(&sysctl_lock);
|
|
|
header->set = lookup_header_set(root, namespaces);
|
|
|
header->attached_by = header->ctl_table;
|