sysctl: Initial support for auto-unregistering sysctl tables.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 10 Jan 2012 01:24:30 +0000 (17:24 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Jan 2012 00:40:28 +0000 (16:40 -0800)
commit938aaa4f9249aa1519fd0db07fc72125de2df338
treefd248564e8988e95966cd425f3f96ce7d094ae1c
parent3cc3e04636d603778d921854b84ae7bd34a349a2
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>
fs/proc/proc_sysctl.c
include/linux/sysctl.h