Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6247
b: refs/heads/master
c: 614c6cb
h: refs/heads/master
i:
  6245: ae37a44
  6243: 32c3052
  6239: 07f7c0d
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Aug 29, 2005
1 parent 488e435 commit 470f5b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6848976b721eeb5551cd94673faafeef78d9f35
refs/heads/master: 614c6cb4f225a7da9f13e5dd0fac3b531078eb9f
9 changes: 9 additions & 0 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 1 addition & 10 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 470f5b0

Please sign in to comment.