summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-target.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-cache-target.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-cache-target.c')
-rw-r--r--drivers/md/dm-cache-target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 1c37fe028e53..89fdfb49d564 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -819,13 +819,13 @@ static void issue_op(struct bio *bio, void *context)
static void remap_to_origin_and_cache(struct cache *cache, struct bio *bio,
dm_oblock_t oblock, dm_cblock_t cblock)
{
- struct bio *origin_bio = bio_clone_fast(bio, GFP_NOIO, &cache->bs);
+ struct bio *origin_bio = bio_alloc_clone(cache->origin_dev->bdev, bio,
+ GFP_NOIO, &cache->bs);
BUG_ON(!origin_bio);
bio_chain(origin_bio, bio);
- remap_to_origin(cache, origin_bio);
if (bio_data_dir(origin_bio) == WRITE)
clear_discard(cache, oblock_to_dblock(cache, oblock));
submit_bio(origin_bio);