aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 241d514343ce..0b3081aa4d63 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1826,13 +1826,10 @@ action_store(mddev_t *mddev, const char *page, size_t len)
1826 mddev->sync_thread = NULL; 1826 mddev->sync_thread = NULL;
1827 mddev->recovery = 0; 1827 mddev->recovery = 0;
1828 } 1828 }
1829 return len; 1829 } else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) ||
1830 } 1830 test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
1831
1832 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) ||
1833 test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
1834 return -EBUSY; 1831 return -EBUSY;
1835 if (cmd_match(page, "resync") || cmd_match(page, "recover")) 1832 else if (cmd_match(page, "resync") || cmd_match(page, "recover"))
1836 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 1833 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
1837 else { 1834 else {
1838 if (cmd_match(page, "check")) 1835 if (cmd_match(page, "check"))
@@ -1841,8 +1838,8 @@ action_store(mddev_t *mddev, const char *page, size_t len)
1841 return -EINVAL; 1838 return -EINVAL;
1842 set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery); 1839 set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
1843 set_bit(MD_RECOVERY_SYNC, &mddev->recovery); 1840 set_bit(MD_RECOVERY_SYNC, &mddev->recovery);
1844 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
1845 } 1841 }
1842 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
1846 md_wakeup_thread(mddev->thread); 1843 md_wakeup_thread(mddev->thread);
1847 return len; 1844 return len;
1848} 1845}