[SCSI] make error handling more robust in the face of reservations
Changes
1 files changed · +6 −4
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| drivers/scsi/scsi_error.c | modified | +6 | −4 | View file |
drivers/scsi/scsi_error.c
View filediff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index cfd01ef..0bd8838 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -473,10 +473,12 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd)
*/
return SUCCESS;
case RESERVATION_CONFLICT:
- /*
- * let issuer deal with this, it could be just fine
- */
- return SUCCESS;
+ if (scmd->cmnd[0] == TEST_UNIT_READY)
+ /* it is a success, we probed the device and
+ * found it */
+ return SUCCESS;
+ /* otherwise, we failed to send the command */
+ return FAILED;
case QUEUE_FULL:
scsi_handle_queue_full(scmd->device);
/* fall through */