diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-10 19:34:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-10 19:37:26 -0500 |
commit | dbdd9a52e38a4a93adfa4d0278801cce4fad98eb (patch) | |
tree | a223ba84f33976b0d2c17d3177cbe976a3c948fc /net/ipv4/route.c | |
parent | 33175d84ee3fa29991adb80513683e010769e807 (diff) |
ipv4: Remove redundant RCU locking in ip_check_mc().
All callers are under rcu_read_lock() protection already.
Rename to ip_check_mc_rcu() to make it even more clear.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index ac32d8f3d68f..f6730d94e307 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2309,8 +2309,8 @@ skip_cache: | |||
2309 | struct in_device *in_dev = __in_dev_get_rcu(dev); | 2309 | struct in_device *in_dev = __in_dev_get_rcu(dev); |
2310 | 2310 | ||
2311 | if (in_dev) { | 2311 | if (in_dev) { |
2312 | int our = ip_check_mc(in_dev, daddr, saddr, | 2312 | int our = ip_check_mc_rcu(in_dev, daddr, saddr, |
2313 | ip_hdr(skb)->protocol); | 2313 | ip_hdr(skb)->protocol); |
2314 | if (our | 2314 | if (our |
2315 | #ifdef CONFIG_IP_MROUTE | 2315 | #ifdef CONFIG_IP_MROUTE |
2316 | || | 2316 | || |
@@ -2368,8 +2368,8 @@ static struct rtable *__mkroute_output(const struct fib_result *res, | |||
2368 | fi = NULL; | 2368 | fi = NULL; |
2369 | } else if (type == RTN_MULTICAST) { | 2369 | } else if (type == RTN_MULTICAST) { |
2370 | flags |= RTCF_MULTICAST | RTCF_LOCAL; | 2370 | flags |= RTCF_MULTICAST | RTCF_LOCAL; |
2371 | if (!ip_check_mc(in_dev, oldflp->fl4_dst, oldflp->fl4_src, | 2371 | if (!ip_check_mc_rcu(in_dev, oldflp->fl4_dst, oldflp->fl4_src, |
2372 | oldflp->proto)) | 2372 | oldflp->proto)) |
2373 | flags &= ~RTCF_LOCAL; | 2373 | flags &= ~RTCF_LOCAL; |
2374 | /* If multicast route do not exist use | 2374 | /* If multicast route do not exist use |
2375 | * default one, but do not gateway in this case. | 2375 | * default one, but do not gateway in this case. |