diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 12:31:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 12:31:48 -0500 |
commit | 3d1f337b3e7378923c89f37afb573a918ef40be5 (patch) | |
tree | 386798378567a10d1c7b24f599cb50f70298694c /net/unix/garbage.c | |
parent | 2bf2154c6bb5599e3ec3f73c34861a0b12aa839e (diff) | |
parent | 5e35941d990123f155b02d5663e51a24f816b6f3 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (235 commits)
[NETFILTER]: Add H.323 conntrack/NAT helper
[TG3]: Don't mark tg3_test_registers() as returning const.
[IPV6]: Cleanups for net/ipv6/addrconf.c (kzalloc, early exit) v2
[IPV6]: Nearly complete kzalloc cleanup for net/ipv6
[IPV6]: Cleanup of net/ipv6/reassambly.c
[BRIDGE]: Remove duplicate const from is_link_local() argument type.
[DECNET]: net/decnet/dn_route.c: fix inconsequent NULL checking
[TG3]: make drivers/net/tg3.c:tg3_request_irq() static
[BRIDGE]: use LLC to send STP
[LLC]: llc_mac_hdr_init const arguments
[BRIDGE]: allow show/store of group multicast address
[BRIDGE]: use llc for receiving STP packets
[BRIDGE]: stp timer to jiffies cleanup
[BRIDGE]: forwarding remove unneeded preempt and bh diasables
[BRIDGE]: netfilter inline cleanup
[BRIDGE]: netfilter VLAN macro cleanup
[BRIDGE]: netfilter dont use __constant_htons
[BRIDGE]: netfilter whitespace
[BRIDGE]: optimize frame pass up
[BRIDGE]: use kzalloc
...
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 | } |