summaryrefslogtreecommitdiffstats
path: root/net/ipv6/inet6_connection_sock.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-20 03:04:19 +0100
committerDavid S. Miller <davem@davemloft.net>2015-03-20 17:40:25 +0100
commit52452c542559ac980b48dbf22a30ee7fa0af507c (patch)
treea212dbe95694ea11e86b9d9aca8a2eba0b06a2d1 /net/ipv6/inet6_connection_sock.c
parentrhashtable: Round up/down min/max_size to ensure we respect limit (diff)
downloadlinux-52452c542559ac980b48dbf22a30ee7fa0af507c.tar.xz
linux-52452c542559ac980b48dbf22a30ee7fa0af507c.zip
inet: drop prev pointer handling in request sock
When request sock are put in ehash table, the whole notion of having a previous request to update dl_next is pointless. Also, following patch will get rid of big purge timer, so we want to delete a request sock without holding listener lock. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/inet6_connection_sock.c')
-rw-r--r--net/ipv6/inet6_connection_sock.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 29b32206e494..b7acb9ebc4f5 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -113,7 +113,6 @@ static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport,
}
struct request_sock *inet6_csk_search_req(const struct sock *sk,
- struct request_sock ***prevp,
const __be16 rport,
const struct in6_addr *raddr,
const struct in6_addr *laddr,
@@ -121,13 +120,13 @@ struct request_sock *inet6_csk_search_req(const struct sock *sk,
{
const struct inet_connection_sock *icsk = inet_csk(sk);
struct listen_sock *lopt = icsk->icsk_accept_queue.listen_opt;
- struct request_sock *req, **prev;
+ struct request_sock *req;
- for (prev = &lopt->syn_table[inet6_synq_hash(raddr, rport,
+ for (req = lopt->syn_table[inet6_synq_hash(raddr, rport,
lopt->hash_rnd,
lopt->nr_table_entries)];
- (req = *prev) != NULL;
- prev = &req->dl_next) {
+ req != NULL;
+ req = req->dl_next) {
const struct inet_request_sock *ireq = inet_rsk(req);
if (ireq->ir_rmt_port == rport &&
@@ -136,7 +135,6 @@ struct request_sock *inet6_csk_search_req(const struct sock *sk,
ipv6_addr_equal(&ireq->ir_v6_loc_addr, laddr) &&
(!ireq->ir_iif || ireq->ir_iif == iif)) {
WARN_ON(req->sk != NULL);
- *prevp = prev;
return req;
}
}