diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /net/unix/garbage.c | |
parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) |
Merge branch 'linus'
Diffstat (limited to 'net/unix/garbage.c')
-rw-r--r-- | net/unix/garbage.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c index 411802bd4d37..746c2f4a5fa6 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c | |||
@@ -76,6 +76,7 @@ | |||
76 | #include <linux/netdevice.h> | 76 | #include <linux/netdevice.h> |
77 | #include <linux/file.h> | 77 | #include <linux/file.h> |
78 | #include <linux/proc_fs.h> | 78 | #include <linux/proc_fs.h> |
79 | #include <linux/mutex.h> | ||
79 | 80 | ||
80 | #include <net/sock.h> | 81 | #include <net/sock.h> |
81 | #include <net/af_unix.h> | 82 | #include <net/af_unix.h> |
@@ -169,7 +170,7 @@ static void maybe_unmark_and_push(struct sock *x) | |||
169 | 170 | ||
170 | void unix_gc(void) | 171 | void unix_gc(void) |
171 | { | 172 | { |
172 | static DECLARE_MUTEX(unix_gc_sem); | 173 | static DEFINE_MUTEX(unix_gc_sem); |
173 | int i; | 174 | int i; |
174 | struct sock *s; | 175 | struct sock *s; |
175 | struct sk_buff_head hitlist; | 176 | struct sk_buff_head hitlist; |
@@ -179,7 +180,7 @@ void unix_gc(void) | |||
179 | * Avoid a recursive GC. | 180 | * Avoid a recursive GC. |
180 | */ | 181 | */ |
181 | 182 | ||
182 | if (down_trylock(&unix_gc_sem)) | 183 | if (!mutex_trylock(&unix_gc_sem)) |
183 | return; | 184 | return; |
184 | 185 | ||
185 | spin_lock(&unix_table_lock); | 186 | spin_lock(&unix_table_lock); |
@@ -308,5 +309,5 @@ void unix_gc(void) | |||
308 | */ | 309 | */ |
309 | 310 | ||
310 | __skb_queue_purge(&hitlist); | 311 | __skb_queue_purge(&hitlist); |
311 | up(&unix_gc_sem); | 312 | mutex_unlock(&unix_gc_sem); |
312 | } | 313 | } |