diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-01-23 06:26:00 +0100 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-01-25 01:40:29 +0100 |
commit | 9eb47c26f09e27506d343ef52e634b2a50ee21ef (patch) | |
tree | 6055ec285771cf35c233d63c783b5c8381847094 /fs | |
parent | sysctl: Rewrite proc_sys_readdir in terms of first_entry and next_entry (diff) | |
download | linux-9eb47c26f09e27506d343ef52e634b2a50ee21ef.tar.xz linux-9eb47c26f09e27506d343ef52e634b2a50ee21ef.zip |
sysctl: Add a root pointer to ctl_table_set
Add a ctl_table_root pointer to ctl_table set so it is easy to
go from a ctl_table_set to a ctl_table_root.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/proc_sysctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index d9c3ae6afe4c..65c13dddceae 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -45,6 +45,7 @@ static struct ctl_table_header root_table_header = { static struct ctl_table_root sysctl_table_root = { .root_list = LIST_HEAD_INIT(sysctl_table_root.root_list), .default_set.list = LIST_HEAD_INIT(root_table_header.ctl_entry), + .default_set.root = &sysctl_table_root, }; static DEFINE_SPINLOCK(sysctl_lock); @@ -1348,9 +1349,11 @@ void unregister_sysctl_table(struct ctl_table_header * header) EXPORT_SYMBOL(unregister_sysctl_table); void setup_sysctl_set(struct ctl_table_set *p, + struct ctl_table_root *root, int (*is_seen)(struct ctl_table_set *)) { INIT_LIST_HEAD(&p->list); + p->root = root; p->is_seen = is_seen; } |