diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-08 23:24:18 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-08 23:24:18 -0700 |
commit | fbfe95a42e90b3dd079cc9019ba7d7700feee0f6 (patch) | |
tree | f5f16e6efcf1411a47df8b836f669fc452489dd4 /net/ipv4/tcp_ipv4.c | |
parent | 7123aaa3a1416529ce461e98108e6b343b294643 (diff) | |
download | blackbird-op-linux-fbfe95a42e90b3dd079cc9019ba7d7700feee0f6.tar.gz blackbird-op-linux-fbfe95a42e90b3dd079cc9019ba7d7700feee0f6.zip |
inet: Create and use rt{,6}_get_peer_create().
There's a lot of places that open-code rt{,6}_get_peer() only because
they want to set 'create' to one. So add an rt{,6}_get_peer_create()
for their sake.
There were also a few spots open-coding plain rt{,6}_get_peer() and
those are transformed here as well.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index f485b451f928..833e8d96a636 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1832,9 +1832,7 @@ struct inet_peer *tcp_v4_get_peer(struct sock *sk, bool *release_it) peer = inet_getpeer_v4(net, inet->inet_daddr, 1); *release_it = true; } else { - if (!rt->peer) - rt_bind_peer(rt, inet->inet_daddr, 1); - peer = rt->peer; + peer = rt_get_peer_create(rt, inet->inet_daddr); *release_it = false; } |