summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2017-01-06 21:38:08 +0100
committerMike Snitzer <snitzer@redhat.com>2017-01-25 12:49:07 +0100
commit105db5991240cb2675f193589130ef0c8a4f70fe (patch)
tree8533c6e09b79fc3cc7b822de31c27972b7e5a89c /drivers/md/dm-raid.c
parentdm raid: use mddev rather than rdev->mddev (diff)
downloadlinux-105db5991240cb2675f193589130ef0c8a4f70fe.tar.xz
linux-105db5991240cb2675f193589130ef0c8a4f70fe.zip
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