summaryrefslogtreecommitdiff
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2017-04-06 15:36:30 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-04-06 13:07:32 -0400
commite8f8d50e07b0bd92f758a4f6d9ab0abf33f52881 (patch)
treeec38388d925a27c7e1b824fb1b95f68acb2f3176 /drivers/scsi/sd.c
parent7a38dc0bfb4cc39ed57e120e2224673f3d4d200f (diff)
downloadlwn-e8f8d50e07b0bd92f758a4f6d9ab0abf33f52881.tar.gz
lwn-e8f8d50e07b0bd92f758a4f6d9ab0abf33f52881.zip
scsi: sd: Return SUCCESS in sd_eh_action() after device offline
If sd_eh_action() decides to take the device offline there is no point in returning FAILED, as taking the device offline is the ultimate step in SCSI EH anyway. So further escalation via SCSI EH is not likely to make a difference and we can as well return SUCCESS. Cc: Benjamin Block <bblock@linux.vnet.ibm.com> Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index bd2a38ef46f5..00b168b6a5fc 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1751,7 +1751,7 @@ static int sd_eh_action(struct scsi_cmnd *scmd, int eh_disp)
"Medium access timeout failure. Offlining disk!\n");
scsi_device_set_state(scmd->device, SDEV_OFFLINE);
- return FAILED;
+ return SUCCESS;
}
return eh_disp;