All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btt: fix block integrity
@ 2024-08-30 20:42 Keith Busch
  2024-09-03 15:47 ` Dave Jiang
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Keith Busch @ 2024-08-30 20:42 UTC (permalink / raw)
  To: dan.j.williams, vishal.l.verma, dave.jiang, nvdimm; +Cc: Keith Busch

From: Keith Busch <kbusch@kernel.org>

bip is NULL before bio_integrity_prep().

Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/nvdimm/btt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 423dcd1909061..13594fb712186 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1435,8 +1435,8 @@ static int btt_do_bvec(struct btt *btt, struct bio_integrity_payload *bip,
 
 static void btt_submit_bio(struct bio *bio)
 {
-	struct bio_integrity_payload *bip = bio_integrity(bio);
 	struct btt *btt = bio->bi_bdev->bd_disk->private_data;
+	struct bio_integrity_payload *bip;
 	struct bvec_iter iter;
 	unsigned long start;
 	struct bio_vec bvec;
@@ -1445,6 +1445,7 @@ static void btt_submit_bio(struct bio *bio)
 
 	if (!bio_integrity_prep(bio))
 		return;
+	bip = bio_integrity(bio);
 
 	do_acct = blk_queue_io_stat(bio->bi_bdev->bd_disk->queue);
 	if (do_acct)
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-11-15 17:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 20:42 [PATCH] btt: fix block integrity Keith Busch
2024-09-03 15:47 ` Dave Jiang
2024-11-13 19:03 ` Ira Weiny
2024-11-13 19:21   ` Keith Busch
2024-11-13 21:28     ` Dan Williams
2024-11-13 21:50       ` Jeff Moyer
2024-11-13 22:06         ` Dan Williams
2024-11-14  4:22           ` Christoph Hellwig
2024-11-14 21:33 ` Verma, Vishal L
2024-11-15 15:19   ` Keith Busch
2024-11-15 17:58     ` Verma, Vishal L

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.