Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570865 > unrolled thread

[PATCH 02/10] ѕd: remove pointless REQ_TYPE_FS check

Started byChristoph Hellwig <hch@lst.de>
First post2017-01-31 17:20 +0100
Last post2017-01-31 17:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 02/10] ѕd: remove pointless REQ_TYPE_FS check Christoph Hellwig <hch@lst.de> - 2017-01-31 17:20 +0100

#1570865 — [PATCH 02/10] ѕd: remove pointless REQ_TYPE_FS check

FromChristoph Hellwig <hch@lst.de>
Date2017-01-31 17:20 +0100
Subject[PATCH 02/10] ѕd: remove pointless REQ_TYPE_FS check
Message-ID<t5JjY-2Qa-1@gated-at.bofh.it>
->done can only be called for fs requests, so no need to check again here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/sd.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index c779986..bd2fb4d 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.1.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web