Re: [PATCH] remove sleep_on from sunrpc

From: Peter Osterlund
Date: Sat Jan 17 2004 - 20:45:25 EST


Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> writes:

> - while (rpciod_pid) {
> + add_wait_queue(&rpciod_killer, &wait);
> + for (;;) {
> + set_current_state(TASK_INTERRUPTIBLE);
> + if (rpciod_pid == 0)
> + break;
> dprintk("rpciod_down: waiting for pid %d to exit\n", rpciod_pid);
> if (signalled()) {
> dprintk("rpciod_down: caught signal\n");
> break;
> }
> - interruptible_sleep_on(&rpciod_killer);
> + schedule();
> }
> - spin_lock_irqsave(&current->sighand->siglock, flags);
> + remove_wait_queue(&rpciod_killer, &wait);
> + spin_lock_irq(&current->sighand->siglock);
> recalc_sigpending();
> - spin_unlock_irqrestore(&current->sighand->siglock, flags);
> + spin_unlock_irq(&current->sighand->siglock);
> out:
> up(&rpciod_sema);
> }

Aren't you forgetting to set_current_state(TASK_RUNNING) after the
loop?

--
Peter Osterlund - petero2@xxxxxxxxx
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/