patch-2.3.16 linux/drivers/char/ftape/lowlevel/ftape-io.c

Next file: linux/drivers/char/generic_serial.c
Previous file: linux/drivers/char/esp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/drivers/char/ftape/lowlevel/ftape-io.c linux/drivers/char/ftape/lowlevel/ftape-io.c
@@ -95,19 +95,19 @@
 
 		TRACE(ft_t_any, "%d msec, %d ticks", time/1000, ticks);
 		timeout = ticks;
-		current->state = TASK_INTERRUPTIBLE;
 		save_flags(flags);
 		sti();
+		set_current_state(TASK_INTERRUPTIBLE);
 		do {
-			while (current->state != TASK_RUNNING) {
-				timeout = schedule_timeout(timeout);
-			}
 			/*  Mmm. Isn't current->blocked == 0xffffffff ?
 			 */
 			if (signal_pending(current)) {
 				TRACE(ft_t_err,
 				      "awoken by non-blocked signal :-(");
 				break;	/* exit on signal */
+			}
+			while (current->state != TASK_RUNNING) {
+				timeout = schedule_timeout(timeout);
 			}
 		} while (timeout);
 		restore_flags(flags);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)