summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-10 04:47:37 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-30 00:37:42 +0200
commit614c6cb4f225a7da9f13e5dd0fac3b531078eb9f (patch)
tree2fd96c3476681cf76647592d4f162004b8c7416e /include
parent[NET]: Cleanup INET_REFCNT_DEBUG code (diff)
downloadlinux-614c6cb4f225a7da9f13e5dd0fac3b531078eb9f.tar.xz
linux-614c6cb4f225a7da9f13e5dd0fac3b531078eb9f.zip
[SOCK]: Rename __tcp_v4_rehash to __sk_prot_rehash
This operation was already generic and DCCP will use it. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h9
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)
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)