summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-02-02 17:01:09 +0100
committerJens Axboe <axboe@kernel.dk>2022-02-04 07:43:18 -0700
commitabfc426d1b2fb2176df59851a64223b58ddae7e7 (patch)
treec5ee019a325bee6b7f158ff409f383781186fa3f /drivers/md/dm.c
parenta0e8de798dd6710a69d69ec57b246a0e34c4a695 (diff)
downloadlinux-abfc426d1b2fb2176df59851a64223b58ddae7e7.tar.gz
linux-abfc426d1b2fb2176df59851a64223b58ddae7e7.tar.bz2
linux-abfc426d1b2fb2176df59851a64223b58ddae7e7.zip
block: pass a block_device to bio_clone_fast
Pass a block_device to bio_clone_fast and __bio_clone_fast and give the functions more suitable names. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Link: https://lore.kernel.org/r/20220202160109.108149-14-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 862564a5df74..ab9cc91931f9 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -520,7 +520,7 @@ static struct dm_io *alloc_io(struct mapped_device *md, struct bio *bio)
struct dm_target_io *tio;
struct bio *clone;
- clone = bio_clone_fast(bio, GFP_NOIO, &md->io_bs);
+ clone = bio_alloc_clone(bio->bi_bdev, bio, GFP_NOIO, &md->io_bs);
tio = clone_to_tio(clone);
tio->inside_dm_io = true;
@@ -553,8 +553,8 @@ static struct bio *alloc_tio(struct clone_info *ci, struct dm_target *ti,
/* the dm_target_io embedded in ci->io is available */
tio = &ci->io->tio;
} else {
- struct bio *clone = bio_clone_fast(ci->bio, gfp_mask,
- &ci->io->md->bs);
+ struct bio *clone = bio_alloc_clone(ci->bio->bi_bdev, ci->bio,
+ gfp_mask, &ci->io->md->bs);
if (!clone)
return NULL;