diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2011-03-18 00:15:02 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-08 01:51:12 -0400 |
commit | 88b4a0347a81539884df5ad535e10cf9fa87d8d4 (patch) | |
tree | de079e08fbaba3cb7cda27f38580eddbe727e55e | |
parent | a74ce1425e4f6075de443274a5e917c84357eac4 (diff) |
net,rcu: convert call_rcu(xt_osf_finger_free_rcu) to kfree_rcu()
The rcu callback xt_osf_finger_free_rcu() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(xt_osf_finger_free_rcu).
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r-- | net/netfilter/xt_osf.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c index 4327e101c047..846f895cb656 100644 --- a/net/netfilter/xt_osf.c +++ b/net/netfilter/xt_osf.c | |||
@@ -62,13 +62,6 @@ static const struct nla_policy xt_osf_policy[OSF_ATTR_MAX + 1] = { | |||
62 | [OSF_ATTR_FINGER] = { .len = sizeof(struct xt_osf_user_finger) }, | 62 | [OSF_ATTR_FINGER] = { .len = sizeof(struct xt_osf_user_finger) }, |
63 | }; | 63 | }; |
64 | 64 | ||
65 | static void xt_osf_finger_free_rcu(struct rcu_head *rcu_head) | ||
66 | { | ||
67 | struct xt_osf_finger *f = container_of(rcu_head, struct xt_osf_finger, rcu_head); | ||
68 | |||
69 | kfree(f); | ||
70 | } | ||
71 | |||
72 | static int xt_osf_add_callback(struct sock *ctnl, struct sk_buff *skb, | 65 | static int xt_osf_add_callback(struct sock *ctnl, struct sk_buff *skb, |
73 | const struct nlmsghdr *nlh, | 66 | const struct nlmsghdr *nlh, |
74 | const struct nlattr * const osf_attrs[]) | 67 | const struct nlattr * const osf_attrs[]) |
@@ -133,7 +126,7 @@ static int xt_osf_remove_callback(struct sock *ctnl, struct sk_buff *skb, | |||
133 | * We are protected by nfnl mutex. | 126 | * We are protected by nfnl mutex. |
134 | */ | 127 | */ |
135 | list_del_rcu(&sf->finger_entry); | 128 | list_del_rcu(&sf->finger_entry); |
136 | call_rcu(&sf->rcu_head, xt_osf_finger_free_rcu); | 129 | kfree_rcu(sf, rcu_head); |
137 | 130 | ||
138 | err = 0; | 131 | err = 0; |
139 | break; | 132 | break; |
@@ -414,7 +407,7 @@ static void __exit xt_osf_fini(void) | |||
414 | 407 | ||
415 | list_for_each_entry_rcu(f, &xt_osf_fingers[i], finger_entry) { | 408 | list_for_each_entry_rcu(f, &xt_osf_fingers[i], finger_entry) { |
416 | list_del_rcu(&f->finger_entry); | 409 | list_del_rcu(&f->finger_entry); |
417 | call_rcu(&f->rcu_head, xt_osf_finger_free_rcu); | 410 | kfree_rcu(f, rcu_head); |
418 | } | 411 | } |
419 | } | 412 | } |
420 | rcu_read_unlock(); | 413 | rcu_read_unlock(); |