From: Hannes Reinecke Date: Thu, 6 Apr 2017 13:36:30 +0000 (+0200) Subject: scsi: sd: Return SUCCESS in sd_eh_action() after device offline X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e8f8d50e07b0bd92f758a4f6d9ab0abf33f52881;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- 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;