summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-04-17 23:27:43 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2024-04-17 23:29:58 +0200
commit0389c09b2fb702ca7924ddf550ce0c8af708b8be (patch)
tree8ea178b415d844aa438a708d570df9bcb8eae6c9 /fs/bcachefs
parentbcachefs: fix leak in bch2_gc_write_reflink_key (diff)
downloadlinux-0389c09b2fb702ca7924ddf550ce0c8af708b8be.tar.xz
linux-0389c09b2fb702ca7924ddf550ce0c8af708b8be.zip
bcachefs: Fix bio alloc in check_extent_checksum()
if the buffer is virtually mapped it won't be a single bvec Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r--fs/bcachefs/backpointers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c
index fadb1078903d..a20044201002 100644
--- a/fs/bcachefs/backpointers.c
+++ b/fs/bcachefs/backpointers.c
@@ -470,7 +470,7 @@ found:
goto err;
}
- bio = bio_alloc(ca->disk_sb.bdev, 1, REQ_OP_READ, GFP_KERNEL);
+ bio = bio_alloc(ca->disk_sb.bdev, buf_pages(data_buf, bytes), REQ_OP_READ, GFP_KERNEL);
bio->bi_iter.bi_sector = p.ptr.offset;
bch2_bio_map(bio, data_buf, bytes);
ret = submit_bio_wait(bio);