Commit 0389c09b authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix bio alloc in check_extent_checksum()



if the buffer is virtually mapped it won't be a single bvec

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 719aec84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -470,7 +470,7 @@ static int check_extent_checksum(struct btree_trans *trans,
		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);