diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-17 23:27:43 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-17 23:29:58 +0200 |
commit | 0389c09b2fb702ca7924ddf550ce0c8af708b8be (patch) | |
tree | 8ea178b415d844aa438a708d570df9bcb8eae6c9 /fs/bcachefs | |
parent | bcachefs: fix leak in bch2_gc_write_reflink_key (diff) | |
download | linux-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.c | 2 |
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); |