Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194625
b: refs/heads/master
c: a2f3be1
h: refs/heads/master
i:
  194623: 8158183
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed May 3, 2010
1 parent 02faf15 commit 836c891
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: 26d27844dfb1d84eafa886f150098c54e192c260
refs/heads/master: a2f3be17c07ad9bd45ab300f79642ecb39cfb553
13 changes: 2 additions & 11 deletions trunk/net/unix/garbage.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,23 +153,14 @@ void unix_notinflight(struct file *fp)
}
}

static inline struct sk_buff *sock_queue_head(struct sock *sk)
{
return (struct sk_buff *)&sk->sk_receive_queue;
}

#define receive_queue_for_each_skb(sk, next, skb) \
for (skb = sock_queue_head(sk)->next, next = skb->next; \
skb != sock_queue_head(sk); skb = next, next = skb->next)

static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),
struct sk_buff_head *hitlist)
{
struct sk_buff *skb;
struct sk_buff *next;

spin_lock(&x->sk_receive_queue.lock);
receive_queue_for_each_skb(x, next, skb) {
skb_queue_walk_safe(&x->sk_receive_queue, skb, next) {
/*
* Do we have file descriptors ?
*/
Expand Down Expand Up @@ -225,7 +216,7 @@ static void scan_children(struct sock *x, void (*func)(struct unix_sock *),
* and perform a scan on them as well.
*/
spin_lock(&x->sk_receive_queue.lock);
receive_queue_for_each_skb(x, next, skb) {
skb_queue_walk_safe(&x->sk_receive_queue, skb, next) {
u = unix_sk(skb->sk);

/*
Expand Down

0 comments on commit 836c891

Please sign in to comment.