aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-09-09 19:23:48 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 19:39:10 -0400
commit9e6603da9b9cfb14a6aca3845227f8c59f7eeb9b (patch)
tree6c915e6a181d0eef4a67c879e4adc899d336a34d /drivers/md
parent15945fee6f09bff1f86b1a735b5888dc59cf38e3 (diff)
[PATCH] md: raid1_quiesce is back to front, fix it.
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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index ba7f5f256161..bfe78571586b 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1708,14 +1708,14 @@ void raid1_quiesce(mddev_t *mddev, int state)
1708 conf_t *conf = mddev_to_conf(mddev); 1708 conf_t *conf = mddev_to_conf(mddev);
1709 1709
1710 switch(state) { 1710 switch(state) {
1711 case 0: 1711 case 1:
1712 spin_lock_irq(&conf->resync_lock); 1712 spin_lock_irq(&conf->resync_lock);
1713 conf->barrier++; 1713 conf->barrier++;
1714 wait_event_lock_irq(conf->wait_idle, !conf->nr_pending, 1714 wait_event_lock_irq(conf->wait_idle, !conf->nr_pending,
1715 conf->resync_lock, raid1_unplug(mddev->queue)); 1715 conf->resync_lock, raid1_unplug(mddev->queue));
1716 spin_unlock_irq(&conf->resync_lock); 1716 spin_unlock_irq(&conf->resync_lock);
1717 break; 1717 break;
1718 case 1: 1718 case 0:
1719 spin_lock_irq(&conf->resync_lock); 1719 spin_lock_irq(&conf->resync_lock);
1720 conf->barrier--; 1720 conf->barrier--;
1721 spin_unlock_irq(&conf->resync_lock); 1721 spin_unlock_irq(&conf->resync_lock);