Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78165
b: refs/heads/master
c: ab70768
h: refs/heads/master
i:
  78163: fb8278a
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jan 28, 2008
1 parent dc43951 commit 670d62b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 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: 65b4c50b47c4ac3d2b5a82e5553b8e5613fb9585
refs/heads/master: ab70768ec78c6784958bab3b58fbe3f4150006df
1 change: 1 addition & 0 deletions trunk/include/net/raw.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ extern void raw_proc_exit(void);
#endif

void raw_hash_sk(struct sock *sk, struct raw_hashinfo *h);
void raw_unhash_sk(struct sock *sk, struct raw_hashinfo *h);

#endif /* _RAW_H */
14 changes: 10 additions & 4 deletions trunk/net/ipv4/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,23 @@ void raw_hash_sk(struct sock *sk, struct raw_hashinfo *h)
}
EXPORT_SYMBOL_GPL(raw_hash_sk);

void raw_unhash_sk(struct sock *sk, struct raw_hashinfo *h)
{
write_lock_bh(&h->lock);
if (sk_del_node_init(sk))
sock_prot_dec_use(sk->sk_prot);
write_unlock_bh(&h->lock);
}
EXPORT_SYMBOL_GPL(raw_unhash_sk);

static void raw_v4_hash(struct sock *sk)
{
raw_hash_sk(sk, &raw_v4_hashinfo);
}

static void raw_v4_unhash(struct sock *sk)
{
write_lock_bh(&raw_v4_hashinfo.lock);
if (sk_del_node_init(sk))
sock_prot_dec_use(sk->sk_prot);
write_unlock_bh(&raw_v4_hashinfo.lock);
raw_unhash_sk(sk, &raw_v4_hashinfo);
}

static struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num,
Expand Down
5 changes: 1 addition & 4 deletions trunk/net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ static void raw_v6_hash(struct sock *sk)

static void raw_v6_unhash(struct sock *sk)
{
write_lock_bh(&raw_v6_hashinfo.lock);
if (sk_del_node_init(sk))
sock_prot_dec_use(sk->sk_prot);
write_unlock_bh(&raw_v6_hashinfo.lock);
raw_unhash_sk(sk, &raw_v6_hashinfo);
}


Expand Down

0 comments on commit 670d62b

Please sign in to comment.