diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-03-21 01:33:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:33:17 -0500 |
commit | 4a3e2f711a00a1feb72ae12fdc749da10179d185 (patch) | |
tree | 76ced9d3270dea4b864da71fa1d4415d2e3c8b11 /net/unix | |
parent | d4ccd08cdfa8d34f4d25b62041343c52fc79385f (diff) |
[NET] sem2mutex: net/
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix')
-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 | } |