[Drbd-dev] [PATCH 3/3] drbd: use bio_alloc_clone() instead of bio_clone_fast()

Michael D Labriola veggiemike at sourceruckus.org
Thu Sep 8 23:13:37 CEST 2022


Between 5.17 and 5.18, bio_clone_fast() was modified to take a
block_device and the function was renamed.  This commit migrates to
the new usage.

Upstream commits:
abfc426d block: pass a block_device to bio_clone_fast

Signed-off-by: Michael D Labriola <veggiemike at sourceruckus.org>
---
 drbd/drbd_req.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drbd/drbd_req.c b/drbd/drbd_req.c
index fc7dfb8d..06ba8ce8 100644
--- a/drbd/drbd_req.c
+++ b/drbd/drbd_req.c
@@ -1715,7 +1715,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_clone_fast(bio, GFP_NOIO, &drbd_io_bio_set);
+		req->private_bio  = bio_alloc_clone(bio->bi_bdev, bio, GFP_NOIO, &drbd_io_bio_set);
 		req->private_bio->bi_private = req;
 		req->private_bio->bi_end_io = drbd_request_endio;
 	}
-- 
2.17.1



More information about the drbd-dev mailing list