From 470f5b04d3e820be1a2f7993d123fafe2a95b6f4 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 9 Aug 2005 19:47:37 -0700 Subject: [PATCH] --- yaml --- r: 6247 b: refs/heads/master c: 614c6cb4f225a7da9f13e5dd0fac3b531078eb9f h: refs/heads/master i: 6245: ae37a449652403dc81d56ff47a2aefcb631bd053 6243: 32c3052f48d84fbc88ff159dff4b236cd392d19e 6239: 07f7c0da75280784c8ebd089f05bbafd8923790e v: v3 --- [refs] | 2 +- trunk/include/net/sock.h | 9 +++++++++ trunk/net/ipv4/tcp_ipv4.c | 11 +---------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 777c5314dd12..bd5d0b96118d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e6848976b721eeb5551cd94673faafeef78d9f35 +refs/heads/master: 614c6cb4f225a7da9f13e5dd0fac3b531078eb9f diff --git a/trunk/include/net/sock.h b/trunk/include/net/sock.h index 11b81551041e..f91ee82522ff 100644 --- a/trunk/include/net/sock.h +++ b/trunk/include/net/sock.h @@ -612,6 +612,15 @@ static __inline__ void sock_prot_dec_use(struct proto *prot) prot->stats[smp_processor_id()].inuse--; } +/* With per-bucket locks this operation is not-atomic, so that + * this version is not worse. + */ +static inline void __sk_prot_rehash(struct sock *sk) +{ + sk->sk_prot->unhash(sk); + sk->sk_prot->hash(sk); +} + /* About 10 seconds */ #define SOCK_DESTROY_TIME (10*HZ) diff --git a/trunk/net/ipv4/tcp_ipv4.c b/trunk/net/ipv4/tcp_ipv4.c index 67c670886c1f..c7c99d336368 100644 --- a/trunk/net/ipv4/tcp_ipv4.c +++ b/trunk/net/ipv4/tcp_ipv4.c @@ -1834,15 +1834,6 @@ int tcp_v4_rcv(struct sk_buff *skb) goto discard_it; } -/* With per-bucket locks this operation is not-atomic, so that - * this version is not worse. - */ -static void __tcp_v4_rehash(struct sock *sk) -{ - sk->sk_prot->unhash(sk); - sk->sk_prot->hash(sk); -} - static int tcp_v4_reselect_saddr(struct sock *sk) { struct inet_sock *inet = inet_sk(sk); @@ -1889,7 +1880,7 @@ static int tcp_v4_reselect_saddr(struct sock *sk) * Besides that, it does not check for connection * uniqueness. Wait for troubles. */ - __tcp_v4_rehash(sk); + __sk_prot_rehash(sk); return 0; }