diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-01-23 00:26:00 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-01-24 19:40:29 -0500 |
commit | 9eb47c26f09e27506d343ef52e634b2a50ee21ef (patch) | |
tree | 6055ec285771cf35c233d63c783b5c8381847094 /fs/proc | |
parent | 6a75ce167c53b41f15088d3c2c7e51c89dc8798a (diff) |
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/proc')
-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 = { | |||
45 | static struct ctl_table_root sysctl_table_root = { | 45 | static struct ctl_table_root sysctl_table_root = { |
46 | .root_list = LIST_HEAD_INIT(sysctl_table_root.root_list), | 46 | .root_list = LIST_HEAD_INIT(sysctl_table_root.root_list), |
47 | .default_set.list = LIST_HEAD_INIT(root_table_header.ctl_entry), | 47 | .default_set.list = LIST_HEAD_INIT(root_table_header.ctl_entry), |
48 | .default_set.root = &sysctl_table_root, | ||
48 | }; | 49 | }; |
49 | 50 | ||
50 | static DEFINE_SPINLOCK(sysctl_lock); | 51 | static DEFINE_SPINLOCK(sysctl_lock); |
@@ -1348,9 +1349,11 @@ void unregister_sysctl_table(struct ctl_table_header * header) | |||
1348 | EXPORT_SYMBOL(unregister_sysctl_table); | 1349 | EXPORT_SYMBOL(unregister_sysctl_table); |
1349 | 1350 | ||
1350 | void setup_sysctl_set(struct ctl_table_set *p, | 1351 | void setup_sysctl_set(struct ctl_table_set *p, |
1352 | struct ctl_table_root *root, | ||
1351 | int (*is_seen)(struct ctl_table_set *)) | 1353 | int (*is_seen)(struct ctl_table_set *)) |
1352 | { | 1354 | { |
1353 | INIT_LIST_HEAD(&p->list); | 1355 | INIT_LIST_HEAD(&p->list); |
1356 | p->root = root; | ||
1354 | p->is_seen = is_seen; | 1357 | p->is_seen = is_seen; |
1355 | } | 1358 | } |
1356 | 1359 | ||