diff options
author | NeilBrown <neilb@suse.com> | 2016-01-04 08:16:58 +0300 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2016-01-07 03:01:14 +0300 |
commit | 274d8cbde1bc3bdfb31c5d6a58113dff5cee4f87 (patch) | |
tree | fb09fc10d836a79132e401ebc1b8029a25934a3c /drivers | |
parent | bb9ef71646606e51adfebdc94231fbbc862dbe28 (diff) | |
download | linux-274d8cbde1bc3bdfb31c5d6a58113dff5cee4f87.tar.xz |
md: Remove 'ready' field from mddev.
This field is always set in tandem with ->pers, and when it is tested
->pers is also tested. So ->ready is not needed.
It was needed once, but code rearrangement and locking changes have
removed that needed.
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 5 | ||||
-rw-r--r-- | drivers/md/md.h | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 43a140457e0c..0d1d822eeda5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -250,8 +250,7 @@ static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio) blk_queue_split(q, &bio, q->bio_split); - if (mddev == NULL || mddev->pers == NULL - || !mddev->ready) { + if (mddev == NULL || mddev->pers == NULL) { bio_io_error(bio); return BLK_QC_T_NONE; } @@ -5298,7 +5297,6 @@ int md_run(struct mddev *mddev) smp_wmb(); spin_lock(&mddev->lock); mddev->pers = pers; - mddev->ready = 1; spin_unlock(&mddev->lock); rdev_for_each(rdev, mddev) if (rdev->raid_disk >= 0) @@ -5498,7 +5496,6 @@ static void __md_stop(struct mddev *mddev) /* Ensure ->event_work is done */ flush_workqueue(md_misc_wq); spin_lock(&mddev->lock); - mddev->ready = 0; mddev->pers = NULL; spin_unlock(&mddev->lock); pers->free(mddev, mddev->private); diff --git a/drivers/md/md.h b/drivers/md/md.h index e16a17c37418..fc6f7bbc9544 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -246,8 +246,6 @@ struct mddev { * are happening, so run/ * takeover/stop are not safe */ - int ready; /* See when safe to pass - * IO requests down */ struct gendisk *gendisk; struct kobject kobj; |