Commit 9134124c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

dm-bufio: use bio_add_virt_nofail



Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the
bio_add_virt_nofail helper implementing it.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20250507120451.4000627-14-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0cb8c299
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1362,7 +1362,7 @@ static void use_bio(struct dm_buffer *b, enum req_op op, sector_t sector,
	ptr = (char *)b->data + offset;
	len = n_sectors << SECTOR_SHIFT;

	__bio_add_page(bio, virt_to_page(ptr), len, offset_in_page(ptr));
	bio_add_virt_nofail(bio, ptr, len);

	submit_bio(bio);
}