Skip to content

Commit 0389c09

Browse files
author
Kent Overstreet
committed
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>
1 parent 719aec8 commit 0389c09

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/bcachefs/backpointers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ static int check_extent_checksum(struct btree_trans *trans,
470470
goto err;
471471
}
472472

473-
bio = bio_alloc(ca->disk_sb.bdev, 1, REQ_OP_READ, GFP_KERNEL);
473+
bio = bio_alloc(ca->disk_sb.bdev, buf_pages(data_buf, bytes), REQ_OP_READ, GFP_KERNEL);
474474
bio->bi_iter.bi_sector = p.ptr.offset;
475475
bch2_bio_map(bio, data_buf, bytes);
476476
ret = submit_bio_wait(bio);

0 commit comments

Comments
 (0)