patch-2.1.127 linux/drivers/cdrom/mcdx.c

Next file: linux/drivers/cdrom/sbpcd.c
Previous file: linux/drivers/cdrom/mcd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.126/linux/drivers/cdrom/mcdx.c linux/drivers/cdrom/mcdx.c
@@ -794,8 +794,7 @@
 	 * allowed! */
     if (current->pid == 0) {
 		while (jiffies < tout) {
-            current->timeout = jiffies;
-            schedule();
+            schedule_timeout(0);
         }
     } else {
         current->timeout = tout;
@@ -1247,6 +1246,7 @@
 {
     int border;
     int done = 0;
+	long timeout;
 
 	if (stuffp->audio) {
 			xwarn("Attempt to read from audio CD.\n");
@@ -1281,13 +1281,12 @@
 
 	do {
 
-	    current->timeout = jiffies + 5 * HZ;
 	    while (stuffp->busy) {
 
-			interruptible_sleep_on(&stuffp->busyq);
+			timeout = interruptible_sleep_on_timeout(&stuffp->busyq, 5*HZ);
 
 			if (!stuffp->introk) { xtrace(XFER, "error via interrupt\n"); }
-			else if (current->timeout == 0) { xtrace(XFER, "timeout\n"); }
+			else if (!timeout) { xtrace(XFER, "timeout\n"); }
 			else if (signal_pending(current)) {
 				xtrace(XFER, "signal\n");
 			} else continue;

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