md: allow a resync that is waiting for other resync to complete, to be aborted.
[deliverable/linux.git] / drivers / md / md.c
index c4bdf0601757f21f4b825993ff30a98205f74cf5..dd3dfe42d5a9d081c590018f1ac6325cfecdaf12 100644 (file)
@@ -6473,10 +6473,11 @@ void md_do_sync(mddev_t *mddev)
                mddev->curr_resync = 2;
 
        try_again:
-               if (kthread_should_stop()) {
+               if (kthread_should_stop())
                        set_bit(MD_RECOVERY_INTR, &mddev->recovery);
+
+               if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
                        goto skip;
-               }
                for_each_mddev(mddev2, tmp) {
                        if (mddev2 == mddev)
                                continue;
This page took 0.026818 seconds and 5 git commands to generate.