Skip to contentSkip to conversation

tgt: Wrong comment and redundant code in scsi_map_user_pages

PATCH In review Boaz Harrosh 1 participant 2 messages May 14, 2009 – May 21, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tgt: Wrong comment and redundant code in scsi_map_user_pages

scsi_init_io() fully prepares the command properly. scsi_tgt_lib need not assign scsi_cmnd members any more.

---
 drivers/scsi/scsi_tgt_lib.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
drivers/scsi/scsi_tgt_lib.c +0 -5
index 1030327..ef11b4d 100644
@@ -383,11 +383,6 @@ static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, struct scsi_cmnd *cmd,
 		scsi_release_buffers(cmd);
 		goto unmap_rq;
 	}
-	/*
-	 * we use REQ_TYPE_BLOCK_PC so scsi_init_io doesn't set the
-	 * length for us.
-	 */
-	cmd->sdb.length = blk_rq_bytes(rq);
 
 	return 0;
 
Signature · 1 line
1.6.2.1
#1 lore raw
Quoted 14 lines · Boaz Harrosh

scsi_init_io() fully prepares the command properly. scsi_tgt_lib need not assign scsi_cmnd members any more.

---
 drivers/scsi/scsi_tgt_lib.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
drivers/scsi/scsi_tgt_lib.c +0 -0
index 1030327..ef11b4d 100644
@@ -383,11 +383,6 @@ static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, struct scsi_cmnd *cmd,
 		scsi_release_buffers(cmd);

drivers/scsi/scsi_tgt_lib.c static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, struct scsi_cmnd *cmd, · line 388

Quoted 10 lines
drivers/scsi/scsi_tgt_lib.c +0 -5
 		goto unmap_rq;
 	}
-	/*
-	 * we use REQ_TYPE_BLOCK_PC so scsi_init_io doesn't set the
-	 * length for us.
-	 */
-	cmd->sdb.length = blk_rq_bytes(rq);
 
 	return 0;
 

Dear TOMO
Ping?

James I forgot to say this should be for post-merge tree as the use of blk_rq_bytes(rq) was done by Tejun. (Given Tomo's Ack of course)

Thanks
Boaz