diff options
author | Keith Busch <kbusch@kernel.org> | 2024-09-13 20:28:51 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-09-13 20:31:45 +0200 |
commit | 27c3785e94f003c664d9d867fbd62d1494546876 (patch) | |
tree | bc2815546a1166c70adf0d9caa4bc22c1235839a /drivers/scsi | |
parent | block: provide a request helper for user integrity segments (diff) | |
download | linux-27c3785e94f003c664d9d867fbd62d1494546876.tar.xz linux-27c3785e94f003c664d9d867fbd62d1494546876.zip |
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 3958a6d14bf4..c602b0af745c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1175,8 +1175,7 @@ blk_status_t scsi_alloc_sgtables(struct scsi_cmnd *cmd) goto out_free_sgtables; } - ivecs = blk_rq_count_integrity_sg(rq->q, rq->bio); - + ivecs = rq->nr_integrity_segments; if (sg_alloc_table_chained(&prot_sdb->table, ivecs, prot_sdb->table.sgl, SCSI_INLINE_PROT_SG_CNT)) { |