Skip to content

Commit 27c3785

Browse files
keithbuschaxboe
authored andcommitted
scsi: use request to get integrity segments
The request tracks the integrity segments already, so no need to recount the segments again. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Kanchan Joshi <joshi.k@samsung.com> Signed-off-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20240913182854.2445457-7-kbusch@meta.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent d2c5b1f commit 27c3785

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/scsi/scsi_lib.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,8 +1175,7 @@ blk_status_t scsi_alloc_sgtables(struct scsi_cmnd *cmd)
11751175
goto out_free_sgtables;
11761176
}
11771177

1178-
ivecs = blk_rq_count_integrity_sg(rq->q, rq->bio);
1179-
1178+
ivecs = rq->nr_integrity_segments;
11801179
if (sg_alloc_table_chained(&prot_sdb->table, ivecs,
11811180
prot_sdb->table.sgl,
11821181
SCSI_INLINE_PROT_SG_CNT)) {

0 commit comments

Comments
 (0)