From 68b568c797c0a93bd1f2e107a6022350d096154e Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 31 Jan 2017 16:57:23 +0100 Subject: [PATCH] =?utf8?q?=D1=95d:=20remove=20pointless=20REQ=5FTYPE=5FFS?= =?utf8?q?=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ->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 --- drivers/scsi/sd.c | 3 --- 1 file changed, 3 deletions(-) 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); -- 2.30.2