Merge remote-tracking branch 'lsk/v3.10/topic/arm64-fvp' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / drivers / md / md.c
index 00a99fe797d402c24c10d2548d32144331008d90..963fa59be9b31ac25f2e5471d85ae372e5b890a8 100644 (file)
@@ -7338,8 +7338,10 @@ void md_do_sync(struct md_thread *thread)
        /* just incase thread restarts... */
        if (test_bit(MD_RECOVERY_DONE, &mddev->recovery))
                return;
-       if (mddev->ro) /* never try to sync a read-only array */
+       if (mddev->ro) {/* never try to sync a read-only array */
+               set_bit(MD_RECOVERY_INTR, &mddev->recovery);
                return;
+       }
 
        if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {
                if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery))
@@ -7788,6 +7790,7 @@ void md_check_recovery(struct mddev *mddev)
                        /* There is no thread, but we need to call
                         * ->spare_active and clear saved_raid_disk
                         */
+                       set_bit(MD_RECOVERY_INTR, &mddev->recovery);
                        md_reap_sync_thread(mddev);
                        clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
                        goto unlock;