patch-2.1.70 linux/drivers/block/md.c

Next file: linux/drivers/cdrom/Config.in
Previous file: linux/drivers/block/ll_rw_blk.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.69/linux/drivers/block/md.c linux/drivers/block/md.c
@@ -987,9 +987,11 @@
 		cli();
 		if (!test_bit(THREAD_WAKEUP, &thread->flags)) {
 			do {
-				current->signal = 0;
-				interruptible_sleep_on(&thread->wqueue);
-			} while (current->signal);
+			         spin_lock_irq(&current->sigmask_lock);
+				 flush_signals(current);
+				 spin_unlock_irq(&current->sigmask_lock);
+				 interruptible_sleep_on(&thread->wqueue);
+			} while (signal_pending(current));
 		}
 	}
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov