summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-01-26 15:52:41 +0100
committerJens Axboe <axboe@kernel.dk>2021-01-27 09:51:48 -0700
commita78f18da669242ad57237070f298212e342bf602 (patch)
treeaa888feb73d672e24f3331ce1aebb72fc6a58b64 /drivers/md/raid1.c
parentae7153f1a7b05acd574d612ed9bdc0fe0a7e0451 (diff)
downloadlinux-a78f18da669242ad57237070f298212e342bf602.tar.gz
linux-a78f18da669242ad57237070f298212e342bf602.tar.bz2
linux-a78f18da669242ad57237070f298212e342bf602.zip
md: remove bio_alloc_mddev
bio_alloc_mddev is never called with a NULL mddev, and ->bio_set is initialized in md_run, so it always must be initialized as well. Just open code the remaining call to bio_alloc_bioset. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Song Liu <song@kernel.org> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Acked-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 3b19141cdb4b..d2378765dc15 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1104,7 +1104,7 @@ static void alloc_behind_master_bio(struct r1bio *r1_bio,
int i = 0;
struct bio *behind_bio = NULL;
- behind_bio = bio_alloc_mddev(GFP_NOIO, vcnt, r1_bio->mddev);
+ behind_bio = bio_alloc_bioset(GFP_NOIO, vcnt, &r1_bio->mddev->bio_set);
if (!behind_bio)
return;