diff options
| author | Christoph Hellwig <[email protected]> | 2022-02-02 16:01:09 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2022-02-04 14:43:18 +0000 |
| commit | abfc426d1b2fb2176df59851a64223b58ddae7e7 (patch) | |
| tree | c5ee019a325bee6b7f158ff409f383781186fa3f /drivers/md/bcache/request.c | |
| parent | block: initialize the target bio in __bio_clone_fast (diff) | |
| download | kernel-abfc426d1b2fb2176df59851a64223b58ddae7e7.tar.gz kernel-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 <[email protected]>
Reviewed-by: Mike Snitzer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/md/bcache/request.c')
| -rw-r--r-- | drivers/md/bcache/request.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index d2cb853bf917..6869e010475a 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -685,7 +685,7 @@ static void do_bio_hook(struct search *s, { struct bio *bio = &s->bio.bio; - __bio_clone_fast(bio, orig_bio, GFP_NOIO); + bio_init_clone(bio->bi_bdev, bio, orig_bio, GFP_NOIO); /* * bi_end_io can be set separately somewhere else, e.g. the * variants in, @@ -1036,7 +1036,8 @@ static void cached_dev_write(struct cached_dev *dc, struct search *s) closure_bio_submit(s->iop.c, flush, cl); } } else { - s->iop.bio = bio_clone_fast(bio, GFP_NOIO, &dc->disk.bio_split); + s->iop.bio = bio_alloc_clone(bio->bi_bdev, bio, GFP_NOIO, + &dc->disk.bio_split); /* I/O request sent to backing device */ bio->bi_end_io = backing_request_endio; closure_bio_submit(s->iop.c, bio, cl); |
