]> git.karo-electronics.de Git - linux-beck.git/commitdiff
md: Remove 'ready' field from mddev.
authorNeilBrown <neilb@suse.com>
Mon, 4 Jan 2016 05:16:58 +0000 (16:16 +1100)
committerNeilBrown <neilb@suse.com>
Thu, 7 Jan 2016 00:01:14 +0000 (11:01 +1100)
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>
drivers/md/md.c
drivers/md/md.h

index 43a140457e0cce1c0a8a53bf93b11227d8868b57..0d1d822eeda5199d70e8820ccb36e0c93acd4a06 100644 (file)
@@ -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);
index e16a17c374183ba422d35a20d2d2c2e37984b26d..fc6f7bbc95444f6de833658eb3265de86d376319 100644 (file)
@@ -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;