From: NeilBrown Date: Fri, 9 Sep 2005 23:23:48 +0000 (-0700) Subject: [PATCH] md: raid1_quiesce is back to front, fix it. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e6603da9b9cfb14a6aca3845227f8c59f7eeb9b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) 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);