From 938aaa4f9249aa1519fd0db07fc72125de2df338 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Mon, 9 Jan 2012 17:24:30 -0800 Subject: 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 --- include/linux/sysctl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/sysctl.h') diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 094bc5ccf1e2..e40b8f6e5d0e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -1032,6 +1032,7 @@ struct ctl_table_header struct list_head ctl_entry; int used; int count; + int nreg; }; struct rcu_head rcu; }; -- cgit v1.2.3