aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2012-01-06 20:08:33 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-02-21 12:03:32 -0500
commit605b4afec8e51d0603089eac01a3ca9dd919e909 (patch)
tree7b57719cd58c9cbce4294eaa7c58afb09fce3829 /net/ipv4
parent4f9c8c1b091628a550b70ee51d7d729187f5c290 (diff)
ipv4: Convert call_rcu() to kfree_rcu(), drop opt_kfree_rcu
The call_rcu() in do_ip_setsockopt() invokes opt_kfree_rcu(), which just calls kfree(). So convert the call_rcu() to kfree_rcu(), which allows opt_kfree_rcu() to be eliminated. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: James Morris <jmorris@namei.org> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Patrick McHardy <kaber@trash.net> Cc: netdev@vger.kernel.org
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_sockglue.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 8aa87c19fa00..5343d9ac510b 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -445,11 +445,6 @@ out:
445} 445}
446 446
447 447
448static void opt_kfree_rcu(struct rcu_head *head)
449{
450 kfree(container_of(head, struct ip_options_rcu, rcu));
451}
452
453/* 448/*
454 * Socket option code for IP. This is the end of the line after any 449 * Socket option code for IP. This is the end of the line after any
455 * TCP,UDP etc options on an IP socket. 450 * TCP,UDP etc options on an IP socket.
@@ -525,7 +520,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
525 } 520 }
526 rcu_assign_pointer(inet->inet_opt, opt); 521 rcu_assign_pointer(inet->inet_opt, opt);
527 if (old) 522 if (old)
528 call_rcu(&old->rcu, opt_kfree_rcu); 523 kfree_rcu(old, rcu);
529 break; 524 break;
530 } 525 }
531 case IP_PKTINFO: 526 case IP_PKTINFO: