Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()

The rcu callback __nf_ct_ext_free_rcu() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(__nf_ct_ext_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>

authored by

Lai Jiangshan and committed by
Paul E. McKenney
1f8d36a1 04d4dfed

+1 -7
+1 -7
net/netfilter/nf_conntrack_extend.c
··· 68 68 return (void *)(*ext) + off; 69 69 } 70 70 71 - static void __nf_ct_ext_free_rcu(struct rcu_head *head) 72 - { 73 - struct nf_ct_ext *ext = container_of(head, struct nf_ct_ext, rcu); 74 - kfree(ext); 75 - } 76 - 77 71 void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) 78 72 { 79 73 struct nf_ct_ext *old, *new; ··· 108 114 (void *)old + old->offset[i]); 109 115 rcu_read_unlock(); 110 116 } 111 - call_rcu(&old->rcu, __nf_ct_ext_free_rcu); 117 + kfree_rcu(old, rcu); 112 118 ct->ext = new; 113 119 } 114 120