tunnels: fix netns vs proto registration ordering
[safe/jmp/linux-2.6] / kernel / semaphore.c
index 1a064ad..94a62c0 100644 (file)
@@ -54,7 +54,6 @@ void down(struct semaphore *sem)
 {
        unsigned long flags;
 
-       ftrace_special(sem->count, 0, __LINE__);
        spin_lock_irqsave(&sem->lock, flags);
        if (likely(sem->count > 0))
                sem->count--;
@@ -213,9 +212,7 @@ static inline int __sched __down_common(struct semaphore *sem, long state,
        waiter.up = 0;
 
        for (;;) {
-               if (state == TASK_INTERRUPTIBLE && signal_pending(task))
-                       goto interrupted;
-               if (state == TASK_KILLABLE && fatal_signal_pending(task))
+               if (signal_pending_state(state, task))
                        goto interrupted;
                if (timeout <= 0)
                        goto timed_out;