]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sysctl: Remove the now unused ctl_table parent field.
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 6 Jan 2012 19:55:30 +0000 (11:55 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Jan 2012 00:40:28 +0000 (16:40 -0800)
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>
fs/proc/proc_sysctl.c
include/linux/sysctl.h

index a492ff60e071b82ca03e8b4491d4a0eece748c9a..e573f9b4f22e56bea0231e269148848372faddc4 100644 (file)
@@ -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;
index 25c7dfe1a7ec7504e118a8e6351957320d0d9aef..094bc5ccf1e2e63f4e8b2df64f586152a79f42c7 100644 (file)
@@ -1016,7 +1016,6 @@ struct ctl_table
        int maxlen;
        umode_t mode;
        struct ctl_table *child;        /* Deprecated */
-       struct ctl_table *parent;       /* Automatically set */
        proc_handler *proc_handler;     /* Callback for text formatting */
        struct ctl_table_poll *poll;
        void *extra1;