From: NeilBrown Date: Sat, 20 May 2006 21:59:57 +0000 (-0700) Subject: [PATCH] md: Fix inverted test for 'repair' directive. X-Git-Tag: MMI-PSA29.97-13-9~49719 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2adc7d47c4dbf684e69ee3980c158ff684dc170e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index d7316b829a62..3ca3cfb03a7e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -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);