summaryrefslogtreecommitdiff
path: root/fs/proc/proc_sysctl.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-06 11:55:30 -0800
committerEric W. Biederman <ebiederm@xmission.com>2012-01-24 16:40:28 -0800
commit8d6ecfcc014332fd2fe933f64194160f0e3a6696 (patch)
tree0e189654469ff7a39bf85a4cd483e2277cac474e /fs/proc/proc_sysctl.c
parent7c60c48f58a78195acc1f71c9a9d01958c02ab89 (diff)
downloadlwn-8d6ecfcc014332fd2fe933f64194160f0e3a6696.tar.gz
lwn-8d6ecfcc014332fd2fe933f64194160f0e3a6696.zip
sysctl: Remove the now unused ctl_table parent field.
While useful at one time for selinux and the sysctl sanity checks those users no longer use the parent field and we can safely remove it. Inspired-by: Lucian Adrian Grijincu <lucian.grijincu@gmil.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/proc/proc_sysctl.c')
-rw-r--r--fs/proc/proc_sysctl.c12
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
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;