1
0
Fork 0

[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: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
hifive-unleashed-5.1
NeilBrown 2006-05-20 14:59:57 -07:00 committed by Linus Torvalds
parent 8c7b389e53
commit 2adc7d47c4
1 changed files with 1 additions and 1 deletions

View File

@ -2252,7 +2252,7 @@ action_store(mddev_t *mddev, const char *page, size_t len)
} else {
if (cmd_match(page, "check"))
set_bit(MD_RECOVERY_CHECK, &mddev->recovery);
else if (cmd_match(page, "repair"))
else if (!cmd_match(page, "repair"))
return -EINVAL;
set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
set_bit(MD_RECOVERY_SYNC, &mddev->recovery);