summaryrefslogtreecommitdiff
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2017-01-06 23:38:08 +0300
committerMike Snitzer <snitzer@redhat.com>2017-01-25 14:49:07 +0300
commit105db5991240cb2675f193589130ef0c8a4f70fe (patch)
tree8533c6e09b79fc3cc7b822de31c27972b7e5a89c /drivers/md/dm-raid.c
parent977f1a0a3f8185136eb78a65b579def69862c635 (diff)
downloadlinux-105db5991240cb2675f193589130ef0c8a4f70fe.tar.xz
dm raid: cleanup awkward branching in raid_message() option processing
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r--drivers/md/dm-raid.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 34442c66bbf1..5c9e95d66f3b 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -3464,10 +3464,11 @@ static int raid_message(struct dm_target *ti, unsigned int argc, char **argv)
else {
if (!strcasecmp(argv[0], "check"))
set_bit(MD_RECOVERY_CHECK, &mddev->recovery);
- else if (!!strcasecmp(argv[0], "repair"))
+ else if (!strcasecmp(argv[0], "repair")) {
+ set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
+ set_bit(MD_RECOVERY_SYNC, &mddev->recovery);
+ } else
return -EINVAL;
- set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
- set_bit(MD_RECOVERY_SYNC, &mddev->recovery);
}
if (mddev->ro == 2) {
/* A write to sync_action is enough to justify