Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295460
b: refs/heads/master
c: 9eb47c2
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Jan 25, 2012
1 parent 8bcc763 commit 9069fb4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6a75ce167c53b41f15088d3c2c7e51c89dc8798a
refs/heads/master: 9eb47c26f09e27506d343ef52e634b2a50ee21ef
3 changes: 3 additions & 0 deletions trunk/fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ struct ctl_table_header

struct ctl_table_set {
struct list_head list;
struct ctl_table_root *root;
int (*is_seen)(struct ctl_table_set *);
};

Expand All @@ -1069,6 +1070,7 @@ struct ctl_path {
void proc_sys_poll_notify(struct ctl_table_poll *poll);

extern void setup_sysctl_set(struct ctl_table_set *p,
struct ctl_table_root *root,
int (*is_seen)(struct ctl_table_set *));
extern void retire_sysctl_set(struct ctl_table_set *set);

Expand Down Expand Up @@ -1103,6 +1105,7 @@ static inline void unregister_sysctl_table(struct ctl_table_header * table)
}

static inline void setup_sysctl_set(struct ctl_table_set *p,
struct ctl_table_root *root,
int (*is_seen)(struct ctl_table_set *))
{
}
Expand Down
5 changes: 2 additions & 3 deletions trunk/net/sysctl_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ static struct ctl_table_root net_sysctl_ro_root = {

static int __net_init sysctl_net_init(struct net *net)
{
setup_sysctl_set(&net->sysctls,
is_seen);
setup_sysctl_set(&net->sysctls, &net_sysctl_root, is_seen);
return 0;
}

Expand All @@ -95,7 +94,7 @@ static __init int net_sysctl_init(void)
ret = register_pernet_subsys(&sysctl_pernet_ops);
if (ret)
goto out;
setup_sysctl_set(&net_sysctl_ro_root.default_set, NULL);
setup_sysctl_set(&net_sysctl_ro_root.default_set, &net_sysctl_ro_root, NULL);
register_sysctl_root(&net_sysctl_ro_root);
register_sysctl_root(&net_sysctl_root);
out:
Expand Down

0 comments on commit 9069fb4

Please sign in to comment.