Skip to content

Commit 42ea299

Browse files
Lai Jiangshanpaulmck
authored andcommitted
net,rcu: convert call_rcu(ip_mc_list_reclaim) to kfree_rcu()
The rcu callback ip_mc_list_reclaim() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(ip_mc_list_reclaim). 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>
1 parent dad178f commit 42ea299

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎net/ipv4/igmp.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,11 @@ static void ip_mc_clear_src(struct ip_mc_list *pmc);
149149
static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,
150150
int sfcount, __be32 *psfsrc, int delta);
151151

152-
153-
static void ip_mc_list_reclaim(struct rcu_head *head)
154-
{
155-
kfree(container_of(head, struct ip_mc_list, rcu));
156-
}
157-
158152
static void ip_ma_put(struct ip_mc_list *im)
159153
{
160154
if (atomic_dec_and_test(&im->refcnt)) {
161155
in_dev_put(im->interface);
162-
call_rcu(&im->rcu, ip_mc_list_reclaim);
156+
kfree_rcu(im, rcu);
163157
}
164158
}
165159

0 commit comments

Comments
 (0)