X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Funix%2Fgarbage.c;h=411802bd4d37e604fe7a337bff2c7becaf84fccb;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=746c2f4a5fa62a290418a0b7780b165678ae7f96;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/net/unix/garbage.c b/net/unix/garbage.c index 746c2f4a5..411802bd4 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c @@ -76,7 +76,6 @@ #include #include #include -#include #include #include @@ -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); }