From 3f1cc3620e5050e601e6ae09f49b9dbcd146dd8b Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Fri, 22 May 2026 19:14:09 +0100 Subject: [PATCH] btrfs: use bvec_phys() in compressed_bio_last_folio() This is open-coded bvec_phys(), also remove direct use of bv_page. Reviewed-by: Qu Wenruo Reviewed-by: Boris Burkov Tested-by: Boris Burkov Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Sterba --- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 973a89301baa..9ce620085467 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -820,7 +820,7 @@ static struct folio *compressed_bio_last_folio(struct compressed_bio *cb) ASSERT(bio->bi_vcnt); bvec = &bio->bi_io_vec[bio->bi_vcnt - 1]; - paddr = page_to_phys(bvec->bv_page) + bvec->bv_offset + bvec->bv_len - 1; + paddr = bvec_phys(bvec) + bvec->bv_len - 1; return page_folio(phys_to_page(paddr)); }