aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/sock.h9
-rw-r--r--net/ipv4/tcp_ipv4.c11
2 files changed, 10 insertions, 10 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 11b81551041e..f91ee82522ff 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -612,6 +612,15 @@ static __inline__ void sock_prot_dec_use(struct proto *prot)
612 prot->stats[smp_processor_id()].inuse--; 612 prot->stats[smp_processor_id()].inuse--;
613} 613}
614 614
615/* With per-bucket locks this operation is not-atomic, so that
616 * this version is not worse.
617 */
618static inline void __sk_prot_rehash(struct sock *sk)
619{
620 sk->sk_prot->unhash(sk);
621 sk->sk_prot->hash(sk);
622}
623
615/* About 10 seconds */ 624/* About 10 seconds */
616#define SOCK_DESTROY_TIME (10*HZ) 625#define SOCK_DESTROY_TIME (10*HZ)
617 626
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 67c670886c1f..c7c99d336368 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1834,15 +1834,6 @@ do_time_wait:
1834 goto discard_it; 1834 goto discard_it;
1835} 1835}
1836 1836
1837/* With per-bucket locks this operation is not-atomic, so that
1838 * this version is not worse.
1839 */
1840static void __tcp_v4_rehash(struct sock *sk)
1841{
1842 sk->sk_prot->unhash(sk);
1843 sk->sk_prot->hash(sk);
1844}
1845
1846static int tcp_v4_reselect_saddr(struct sock *sk) 1837static int tcp_v4_reselect_saddr(struct sock *sk)
1847{ 1838{
1848 struct inet_sock *inet = inet_sk(sk); 1839 struct inet_sock *inet = inet_sk(sk);
@@ -1889,7 +1880,7 @@ static int tcp_v4_reselect_saddr(struct sock *sk)
1889 * Besides that, it does not check for connection 1880 * Besides that, it does not check for connection
1890 * uniqueness. Wait for troubles. 1881 * uniqueness. Wait for troubles.
1891 */ 1882 */
1892 __tcp_v4_rehash(sk); 1883 __sk_prot_rehash(sk);
1893 return 0; 1884 return 0;
1894} 1885}
1895 1886