aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2020-08-26 19:48:53 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-26 16:00:51 -0700
commit233c63785cd92e12d61b283d0eaeafc867fc45f5 (patch)
treec08f3ad82d14496b108d58e9ae9fc4cf4743216a /net/ipv4
parentipv4: nexthop: Use nla_put_be32() for NHA_GATEWAY (diff)
downloadlinux-dev-233c63785cd92e12d61b283d0eaeafc867fc45f5.tar.xz
linux-dev-233c63785cd92e12d61b283d0eaeafc867fc45f5.zip
ipv4: nexthop: Remove unnecessary rtnl_dereference()
The pointer is not RCU protected, so remove the unnecessary rtnl_dereference(). This suppresses the following warning: net/ipv4/nexthop.c:1101:24: error: incompatible types in comparison expression (different address spaces): net/ipv4/nexthop.c:1101:24: struct rb_node [noderef] __rcu * net/ipv4/nexthop.c:1101:24: struct rb_node * Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/nexthop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 0823643a7dec..1b736e3e1baa 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -1098,7 +1098,7 @@ static int insert_nexthop(struct net *net, struct nexthop *new_nh,
while (1) {
struct nexthop *nh;
- next = rtnl_dereference(*pp);
+ next = *pp;
if (!next)
break;