Skip to contentSkip to conversation

dm-verity: switch to bio_advance_iter_single()

PATCH In review Eric Biggers 2 participants 2 messages Jan 11 – Jan 23 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm-verity: switch to bio_advance_iter_single()

dm-verity doesn't support data blocks that span pages, and it sets dma_alignment accordingly. As such, instead of using bio_advance_iter(), it can use the more lightweight function bio_advance_iter_single() to get the same result.

---
 drivers/md/dm-verity-target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-verity-target.c +1 -1
index 777a0ebe8536..4b86f7faffd0 100644
@@ -526,11 +526,11 @@ static int verity_verify_io(struct dm_verity_io *io)
 		iter = &iter_copy;
 	} else
 		iter = &io->iter;
 
 	for (b = 0; b < io->n_blocks;
-	     b++, bio_advance_iter(bio, iter, block_size)) {
+	     b++, bio_advance_iter_single(bio, iter, block_size)) {
 		sector_t blkno = io->block + b;
 		struct pending_block *block;
 		bool is_zero;
 		struct bio_vec bv;
 		void *data;

base-commit: 8fbb8fe75d4cf92eaa7b21828ec39c1bf79a262f

Signature · 1 line
2.52.0