diff options
author | 2011-10-26 21:46:20 -0700 | |
---|---|---|
committer | 2011-10-26 21:46:20 -0700 | |
commit | 6ad390a25a9d1d8606b9b826878f0a30639dc2b3 (patch) | |
tree | 05aff14f02776bc0d59a1f777cb92df6f4456ba9 /kernel/sysctl.c | |
parent | Input: wacom - revert "Cintiq 21UX2 does not have menu strips" (diff) | |
parent | Input: adp5589-keys - add support for the ADP5585 derivatives (diff) | |
download | wireguard-linux-6ad390a25a9d1d8606b9b826878f0a30639dc2b3.tar.xz wireguard-linux-6ad390a25a9d1d8606b9b826878f0a30639dc2b3.zip |
Merge branch 'next' into for-linus
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index f175d98bd355..11d65b531e50 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1590,16 +1590,11 @@ void sysctl_head_get(struct ctl_table_header *head) spin_unlock(&sysctl_lock); } -static void free_head(struct rcu_head *rcu) -{ - kfree(container_of(rcu, struct ctl_table_header, rcu)); -} - void sysctl_head_put(struct ctl_table_header *head) { spin_lock(&sysctl_lock); if (!--head->count) - call_rcu(&head->rcu, free_head); + kfree_rcu(head, rcu); spin_unlock(&sysctl_lock); } @@ -1971,10 +1966,10 @@ void unregister_sysctl_table(struct ctl_table_header * header) start_unregistering(header); if (!--header->parent->count) { WARN_ON(1); - call_rcu(&header->parent->rcu, free_head); + kfree_rcu(header->parent, rcu); } if (!--header->count) - call_rcu(&header->rcu, free_head); + kfree_rcu(header, rcu); spin_unlock(&sysctl_lock); } |