]> err.no Git - linux-2.6/commitdiff
[PATCH] md: raid1_quiesce is back to front, fix it.
authorNeilBrown <neilb@cse.unsw.edu.au>
Fri, 9 Sep 2005 23:23:48 +0000 (16:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 9 Sep 2005 23:39:10 +0000 (16:39 -0700)
A state of 0 mean 'not quiesced'
A state of 1 means 'is quiesced'

The original code got this wrong.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid1.c

index ba7f5f25616192914eff0c4457f85d54d86ab04c..bfe78571586b98c3b50c4a2b917048ff43402025 100644 (file)
@@ -1708,14 +1708,14 @@ void raid1_quiesce(mddev_t *mddev, int state)
        conf_t *conf = mddev_to_conf(mddev);
 
        switch(state) {
-       case 0:
+       case 1:
                spin_lock_irq(&conf->resync_lock);
                conf->barrier++;
                wait_event_lock_irq(conf->wait_idle, !conf->nr_pending,
                                    conf->resync_lock, raid1_unplug(mddev->queue));
                spin_unlock_irq(&conf->resync_lock);
                break;
-       case 1:
+       case 0:
                spin_lock_irq(&conf->resync_lock);
                conf->barrier--;
                spin_unlock_irq(&conf->resync_lock);