From: Bart Van Assche Date: Tue, 17 Apr 2018 01:04:40 +0000 (-0700) Subject: scsi: sd_zbc: Let the SCSI core handle ILLEGAL REQUEST / ASC 0x21 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c976562162a0bd8f460e5499e13118371da1a66a;p=linux.git scsi: sd_zbc: Let the SCSI core handle ILLEGAL REQUEST / ASC 0x21 scsi_io_completion() translates the sense key ILLEGAL REQUEST / ASC 0x21 into ACTION_FAIL. That means that setting cmd->allowed to zero in sd_zbc_complete() for this sense code / ASC combination is not necessary. Hence remove the code that resets cmd->allowed from sd_zbc_complete(). Signed-off-by: Bart Van Assche Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index 41df75eea57be..2d0c06f7db3ed 100644 --- a/drivers/scsi/sd_zbc.c +++ b/drivers/scsi/sd_zbc.c @@ -299,16 +299,6 @@ void sd_zbc_complete(struct scsi_cmnd *cmd, unsigned int good_bytes, case REQ_OP_WRITE: case REQ_OP_WRITE_ZEROES: case REQ_OP_WRITE_SAME: - - if (result && - sshdr->sense_key == ILLEGAL_REQUEST && - sshdr->asc == 0x21) - /* - * INVALID ADDRESS FOR WRITE error: It is unlikely that - * retrying write requests failed with any kind of - * alignement error will result in success. So don't. - */ - cmd->allowed = 0; break; case REQ_OP_ZONE_REPORT: