Commit 2adc7d47 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] md: Fix inverted test for 'repair' directive.

We should be able to write 'repair' to /sys/block/mdX/md/sync_action,
however due to and inverted test, that always given EINVAL.
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8c7b389e
...@@ -2252,7 +2252,7 @@ action_store(mddev_t *mddev, const char *page, size_t len) ...@@ -2252,7 +2252,7 @@ action_store(mddev_t *mddev, const char *page, size_t len)
} else { } else {
if (cmd_match(page, "check")) if (cmd_match(page, "check"))
set_bit(MD_RECOVERY_CHECK, &mddev->recovery); set_bit(MD_RECOVERY_CHECK, &mddev->recovery);
else if (cmd_match(page, "repair")) else if (!cmd_match(page, "repair"))
return -EINVAL; return -EINVAL;
set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery); set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
set_bit(MD_RECOVERY_SYNC, &mddev->recovery); set_bit(MD_RECOVERY_SYNC, &mddev->recovery);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment