sysctl: Initial support for auto-unregistering sysctl tables.
Add nreg to ctl_table_header. When nreg drops to 0 the ctl_table_header will be unregistered. Factor out drop_sysctl_table from unregister_sysctl_table, and add the logic for decrementing nreg. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
This commit is contained in:
@@ -1032,6 +1032,7 @@ struct ctl_table_header
|
||||
struct list_head ctl_entry;
|
||||
int used;
|
||||
int count;
|
||||
int nreg;
|
||||
};
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
Reference in New Issue
Block a user