This adds a small helper retire_sysctl_set to remove the intimate knowledge about
the how a sysctl_set is implemented from net/sysct_net.c
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
p->is_seen = is_seen;
}
+void retire_sysctl_set(struct ctl_table_set *set)
+{
+ WARN_ON(!list_empty(&set->list));
+}
int __init proc_sys_init(void)
{
extern void setup_sysctl_set(struct ctl_table_set *p,
struct ctl_table_set *parent,
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_paths(
static void __net_exit sysctl_net_exit(struct net *net)
{
- WARN_ON(!list_empty(&net->sysctls.list));
+ retire_sysctl_set(&net->sysctls);
}
static struct pernet_operations sysctl_pernet_ops = {