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/md.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/md.c')
| -rw-r--r-- | drivers/md/md.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 0a89f072dae0..f88a9e948f3e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -8634,13 +8634,14 @@ static void md_end_io_acct(struct bio *bio) */ void md_account_bio(struct mddev *mddev, struct bio **bio) { + struct block_device *bdev = (*bio)->bi_bdev; struct md_io_acct *md_io_acct; struct bio *clone; - if (!blk_queue_io_stat((*bio)->bi_bdev->bd_disk->queue)) + if (!blk_queue_io_stat(bdev->bd_disk->queue)) return; - clone = bio_clone_fast(*bio, GFP_NOIO, &mddev->io_acct_set); + clone = bio_alloc_clone(bdev, *bio, GFP_NOIO, &mddev->io_acct_set); md_io_acct = container_of(clone, struct md_io_acct, bio_clone); md_io_acct->orig_bio = *bio; md_io_acct->start_time = bio_start_io_acct(*bio); |
