mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
15945fee6f
commit
9e6603da9b
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue