From: Christoph Hellwig Date: Tue, 31 Jan 2017 15:57:23 +0000 (+0100) Subject: ѕd: remove pointless REQ_TYPE_FS check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=68b568c797c0a93bd1f2e107a6022350d096154e;p=openwrt%2Fstaging%2Fblogic.git ѕd: remove pointless REQ_TYPE_FS check ->done can only be called for fs requests, so no need to check again here. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index c779986edb43..bd2fb4d52efa 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1735,9 +1735,6 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd) unsigned int transferred = scsi_bufflen(scmd) - scsi_get_resid(scmd); unsigned int good_bytes; - if (scmd->request->cmd_type != REQ_TYPE_FS) - return 0; - info_valid = scsi_get_sense_info_fld(scmd->sense_buffer, SCSI_SENSE_BUFFERSIZE, &bad_lba);