Skip to content

Commit

Permalink
drbd: fixup bio_alloc_clone argument
Browse files Browse the repository at this point in the history
Actually, we want to use the DRBD device's backing_bdev here, not the
bio's bdev.
  • Loading branch information
chrboe committed Sep 29, 2022
1 parent 945b5e5 commit 7e7111b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drbd/drbd_req.c
Expand Up @@ -1717,7 +1717,7 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio,
req->start_jif = bio_start_io_acct(req->master_bio);

if (get_ldev(device)) {
req->private_bio = bio_alloc_clone(bio->bi_bdev, bio, GFP_NOIO, &drbd_io_bio_set);
req->private_bio = bio_alloc_clone(device->ldev->backing_bdev, bio, GFP_NOIO, &drbd_io_bio_set);
req->private_bio->bi_private = req;
req->private_bio->bi_end_io = drbd_request_endio;
}
Expand Down

0 comments on commit 7e7111b

Please sign in to comment.