aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-31 06:07:15 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-31 06:07:15 -0400
commite37c83c06c2690157a989df40dc99a6b61c9ea15 (patch)
tree024dfb8b2c9abeec9ca7cb0c0136c276d9aacc91 /net/unix/garbage.c
parentce1f7d30766f6549db6fa0b9e595e0d26a5b7d9a (diff)
parent67a3e12b05e055c0415c556a315a3d3eb637e29e (diff)
Merge commit 'v2.6.35-rc1' into for-2.6.36
Diffstat (limited to 'net/unix/garbage.c')
-rw-r--r--net/unix/garbage.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 19c17e4a0c8b..c8df6fda0b1f 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -74,7 +74,6 @@
74#include <linux/un.h> 74#include <linux/un.h>
75#include <linux/net.h> 75#include <linux/net.h>
76#include <linux/fs.h> 76#include <linux/fs.h>
77#include <linux/slab.h>
78#include <linux/skbuff.h> 77#include <linux/skbuff.h>
79#include <linux/netdevice.h> 78#include <linux/netdevice.h>
80#include <linux/file.h> 79#include <linux/file.h>
@@ -154,15 +153,6 @@ void unix_notinflight(struct file *fp)
154 } 153 }
155} 154}
156 155
157static inline struct sk_buff *sock_queue_head(struct sock *sk)
158{
159 return (struct sk_buff *)&sk->sk_receive_queue;
160}
161
162#define receive_queue_for_each_skb(sk, next, skb) \
163 for (skb = sock_queue_head(sk)->next, next = skb->next; \
164 skb != sock_queue_head(sk); skb = next, next = skb->next)
165
166static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *), 156static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),
167 struct sk_buff_head *hitlist) 157 struct sk_buff_head *hitlist)
168{ 158{
@@ -170,7 +160,7 @@ static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),
170 struct sk_buff *next; 160 struct sk_buff *next;
171 161
172 spin_lock(&x->sk_receive_queue.lock); 162 spin_lock(&x->sk_receive_queue.lock);
173 receive_queue_for_each_skb(x, next, skb) { 163 skb_queue_walk_safe(&x->sk_receive_queue, skb, next) {
174 /* 164 /*
175 * Do we have file descriptors ? 165 * Do we have file descriptors ?
176 */ 166 */
@@ -226,7 +216,7 @@ static void scan_children(struct sock *x, void (*func)(struct unix_sock *),
226 * and perform a scan on them as well. 216 * and perform a scan on them as well.
227 */ 217 */
228 spin_lock(&x->sk_receive_queue.lock); 218 spin_lock(&x->sk_receive_queue.lock);
229 receive_queue_for_each_skb(x, next, skb) { 219 skb_queue_walk_safe(&x->sk_receive_queue, skb, next) {
230 u = unix_sk(skb->sk); 220 u = unix_sk(skb->sk);
231 221
232 /* 222 /*