Skip to contentSkip to conversation

scsi/st: replace schedule_timeout() with msleep_interruptible()

PATCH New [email protected] 1 participant 1 message Oct 21, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 10/10 scsi/st: replace schedule_timeout() with msleep_interruptible()

Any comments would be appreciated.

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

---

 linux-2.6.9-max/drivers/scsi/st.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/st.c renamed from drivers/scsi/st.c~msleep_interruptible-drivers_scsi_st +1 -2
diff -puN drivers/scsi/st.c~msleep_interruptible-drivers_scsi_st drivers/scsi/st.c
@@ -760,8 +760,7 @@ static int test_ready(Scsi_Tape *STp, in
 
 			if (scode == NOT_READY) {
 				if (waits < max_wait) {
-					set_current_state(TASK_INTERRUPTIBLE);
-					schedule_timeout(HZ);
+					msleep_interruptible(1000);
 					if (signal_pending(current)) {
 						retval = (-EINTR);
 						break;

_