Loading include/net/sock.h +9 −0 Original line number Diff line number Diff line Loading @@ -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) Loading net/ipv4/tcp_ipv4.c +1 −10 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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; } Loading Loading
include/net/sock.h +9 −0 Original line number Diff line number Diff line Loading @@ -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) Loading
net/ipv4/tcp_ipv4.c +1 −10 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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; } Loading