*/
if (wq->name.name) {
/* Block all but "shutdown" signals while waiting */
- sigset_t oldset;
+ sigset_t oldset, blocked;
unsigned long irqflags;
- spin_lock_irqsave(¤t->sighand->siglock, irqflags);
oldset = current->blocked;
- siginitsetinv(¤t->blocked, SHUTDOWN_SIGS & ~oldset.sig[0]);
- recalc_sigpending();
- spin_unlock_irqrestore(¤t->sighand->siglock, irqflags);
+ siginitsetinv(&blocked, SHUTDOWN_SIGS & ~oldset.sig[0]);
+ set_current_blocked(&blocked);
wait_event_interruptible(wq->queue, wq->name.name == NULL);
- spin_lock_irqsave(¤t->sighand->siglock, irqflags);
- current->blocked = oldset;
- recalc_sigpending();
- spin_unlock_irqrestore(¤t->sighand->siglock, irqflags);
+ set_current_blocked(&oldset);
} else {
DPRINTK("skipped sleeping");
}