Commit 23f5d69d authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

bcache: 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 avatarColy Li <colyli@kernel.org>
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-9-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6ff54f45
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -293,8 +293,7 @@ static void __write_super(struct cache_sb *sb, struct cache_sb_disk *out,

	bio->bi_opf = REQ_OP_WRITE | REQ_SYNC | REQ_META;
	bio->bi_iter.bi_sector	= SB_SECTOR;
	__bio_add_page(bio, virt_to_page(out), SB_SIZE,
			offset_in_page(out));
	bio_add_virt_nofail(bio, out, SB_SIZE);

	out->offset		= cpu_to_le64(sb->offset);