mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
md: remove md_bio_alloc_sync
md_bio_alloc_sync is never called with a NULL mddev, and ->sync_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 <[email protected]> Acked-by: Song Liu <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Acked-by: Damien Le Moal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
32637385b8
commit
6a59656968
1 file changed
+1
-9
+1
-9
@@ -340,14 +340,6 @@ static int start_readonly;
|
||||
*/
|
||||
static bool create_on_open = true;
|
||||
|
||||
static struct bio *md_bio_alloc_sync(struct mddev *mddev)
|
||||
{
|
||||
if (!mddev || !bioset_initialized(&mddev->sync_set))
|
||||
return bio_alloc(GFP_NOIO, 1);
|
||||
|
||||
return bio_alloc_bioset(GFP_NOIO, 1, &mddev->sync_set);
|
||||
}
|
||||
|
||||
/*
|
||||
* We have a system wide 'event count' that is incremented
|
||||
* on any 'interesting' event, and readers of /proc/mdstat
|
||||
@@ -989,7 +981,7 @@ void md_super_write(struct mddev *mddev, struct md_rdev *rdev,
|
||||
if (test_bit(Faulty, &rdev->flags))
|
||||
return;
|
||||
|
||||
bio = md_bio_alloc_sync(mddev);
|
||||
bio = bio_alloc_bioset(GFP_NOIO, 1, &mddev->sync_set);
|
||||
|
||||
atomic_inc(&rdev->nr_pending);
|
||||
|
||||
|
||||
Reference in new issue
Block a user