linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / unix / garbage.c
index 746c2f4..411802b 100644 (file)
@@ -76,7 +76,6 @@
 #include <linux/netdevice.h>
 #include <linux/file.h>
 #include <linux/proc_fs.h>
-#include <linux/mutex.h>
 
 #include <net/sock.h>
 #include <net/af_unix.h>
@@ -170,7 +169,7 @@ static void maybe_unmark_and_push(struct sock *x)
 
 void unix_gc(void)
 {
-       static DEFINE_MUTEX(unix_gc_sem);
+       static DECLARE_MUTEX(unix_gc_sem);
        int i;
        struct sock *s;
        struct sk_buff_head hitlist;
@@ -180,7 +179,7 @@ void unix_gc(void)
         *      Avoid a recursive GC.
         */
 
-       if (!mutex_trylock(&unix_gc_sem))
+       if (down_trylock(&unix_gc_sem))
                return;
 
        spin_lock(&unix_table_lock);
@@ -309,5 +308,5 @@ void unix_gc(void)
         */
 
        __skb_queue_purge(&hitlist);
-       mutex_unlock(&unix_gc_sem);
+       up(&unix_gc_sem);
 }