Skip to contentSkip to conversation

drivers/ide/ide-tape.c: replace direct assignment with

PATCH New Christophe Lucas 1 participant 2 messages May 4, 2005 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/ide/ide-tape.c: replace direct assignment with

description:
Use set_current_state() instead of direct assignment of current->state.

drivers/ide/ide-tape.c +1 -1
diff -urpNX dontdiff a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
@@ -2903,7 +2903,7 @@ static int idetape_wait_ready(ide_drive_
 		} else if (!(tape->sense_key == 2 && tape->asc == 4 &&
 			     (tape->ascq == 1 || tape->ascq == 8)))
 			return -EIO;
-		current->state = TASK_INTERRUPTIBLE;
+		set_current_state(TASK_INTERRUPTIBLE);
   		schedule_timeout(HZ / 10);
 	}
 	return -EIO;

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw

PATCH 1/1 drivers/ide/ide-tape.c: replace by msleep_interruptible

description:
Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected.

drivers/ide/ide-tape.c +1 -2
Index: b/drivers/ide/ide-tape.c
===================================================================
@@ -2903,8 +2903,7 @@
 		} else if (!(tape->sense_key == 2 && tape->asc == 4 &&
 			     (tape->ascq == 1 || tape->ascq == 8)))
 			return -EIO;
-		set_current_state(TASK_INTERRUPTIBLE);
-  		schedule_timeout(HZ / 10);
+		msleep_interruptible(100);
 	}
 	return -EIO;
 }

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors