Skip to content

Commit

Permalink
sysctl: Remove dead register_sysctl_root
Browse files Browse the repository at this point in the history
The function no longer does anything.  The is only a single caller of
register_sysctl_root when semantically there should be two.  Remove
this function so that if someone decides this functionality is needed
again it will be obvious all of the callers of setup_sysctl_set need
to be audited and modified appropriately.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
  • Loading branch information
ebiederm committed Apr 17, 2017
1 parent 040757f commit b54807f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,6 @@ static void next_entry(struct ctl_table_header **phead, struct ctl_table **pentr
*pentry = entry;
}

void register_sysctl_root(struct ctl_table_root *root)
{
}

/*
* sysctl_perm does NOT grant the superuser all rights automatically, because
* some sysctl variables are readonly even to root.
Expand Down
1 change: 0 additions & 1 deletion include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ extern void setup_sysctl_set(struct ctl_table_set *p,
int (*is_seen)(struct ctl_table_set *));
extern void retire_sysctl_set(struct ctl_table_set *set);

void register_sysctl_root(struct ctl_table_root *root);
struct ctl_table_header *__register_sysctl_table(
struct ctl_table_set *set,
const char *path, struct ctl_table *table);
Expand Down
1 change: 0 additions & 1 deletion net/sysctl_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ __init int net_sysctl_init(void)
ret = register_pernet_subsys(&sysctl_pernet_ops);
if (ret)
goto out1;
register_sysctl_root(&net_sysctl_root);
out:
return ret;
out1:
Expand Down

0 comments on commit b54807f

Please sign in to comment.