diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-03-30 22:35:56 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-03-30 22:35:56 -0500 |
| commit | d62e54abca1146981fc9f98f85ff398a113a22c2 (patch) | |
| tree | 870420dbc4c65e716dcef8a802aafdc0ef97a8b4 /net/unix/garbage.c | |
| parent | fd4a0b92db6a57cba8d03efbe1cebf91f9124ce0 (diff) | |
| parent | ce362c009250340358a7221f3cdb7954cbf19c01 (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
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 | } |
