diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sock.h | 9 |
1 files changed, 9 insertions, 0 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 | */ | ||
618 | static 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 | ||