diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2005-09-18 16:05:20 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-09-19 10:24:52 -0400 |
commit | 939647ee308e0ad924e776657704c7bedd498664 (patch) | |
tree | cfff68b8f65a53e186fd1e7443aa370885ac1ed9 /drivers/scsi/scsi_ioctl.c | |
parent | a64358db1253b35d508a411e80a3ad23b859ec88 (diff) |
[SCSI] fix oops on usb storage device disconnect
We fix the oops by enforcing the host state model. There have also
been two extra states added: SHOST_CANCEL_RECOVERY and
SHOST_DEL_RECOVERY so we can take the model through host removal while
the recovery thread is active.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r-- | drivers/scsi/scsi_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index b7fddac81347..de7f98cc38fe 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c | |||
@@ -458,7 +458,7 @@ int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd, | |||
458 | * error processing, as long as the device was opened | 458 | * error processing, as long as the device was opened |
459 | * non-blocking */ | 459 | * non-blocking */ |
460 | if (filp && filp->f_flags & O_NONBLOCK) { | 460 | if (filp && filp->f_flags & O_NONBLOCK) { |
461 | if (sdev->host->shost_state == SHOST_RECOVERY) | 461 | if (scsi_host_in_recovery(sdev->host)) |
462 | return -ENODEV; | 462 | return -ENODEV; |
463 | } else if (!scsi_block_when_processing_errors(sdev)) | 463 | } else if (!scsi_block_when_processing_errors(sdev)) |
464 | return -ENODEV; | 464 | return -ENODEV; |