summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-12-27 07:04:25 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-12-27 07:04:25 +0300
commitf0cf008f6bbf5710ba583821687602ec52997a36 (patch)
treed62074714cfee4dbf4587e206fc0809bc9558e3a
parent3bef22eed98b53cfb3962884f14068251a5dd3f0 (diff)
parent312045eef985b61d74c28047ecd8eca6719d9516 (diff)
downloadlinux-f0cf008f6bbf5710ba583821687602ec52997a36.tar.xz
Merge tag 'md/4.4-rc6-fix' of git://neil.brown.name/md
Pull md bugfix from Neil Brown: "One more md fix for 4.4-rc Fix a regression which causes reshape to not start properly sometimes" * tag 'md/4.4-rc6-fix' of git://neil.brown.name/md: md: remove check for MD_RECOVERY_NEEDED in action_store.
-rw-r--r--drivers/md/md.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index dbedc58d8c00..61aacab424cf 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4326,8 +4326,7 @@ action_store(struct mddev *mddev, const char *page, size_t len)
}
mddev_unlock(mddev);
}
- } else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) ||
- test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
+ } else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
return -EBUSY;
else if (cmd_match(page, "resync"))
clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
@@ -4340,8 +4339,12 @@ action_store(struct mddev *mddev, const char *page, size_t len)
return -EINVAL;
err = mddev_lock(mddev);
if (!err) {
- clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
- err = mddev->pers->start_reshape(mddev);
+ if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
+ err = -EBUSY;
+ else {
+ clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
+ err = mddev->pers->start_reshape(mddev);
+ }
mddev_unlock(mddev);
}
if (err)