diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-27 05:04:25 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-27 05:04:25 +0100 |
commit | f0cf008f6bbf5710ba583821687602ec52997a36 (patch) | |
tree | d62074714cfee4dbf4587e206fc0809bc9558e3a /drivers | |
parent | Merge tag 'upstream-4.4-rc7' of git://git.infradead.org/linux-ubifs (diff) | |
parent | md: remove check for MD_RECOVERY_NEEDED in action_store. (diff) | |
download | linux-f0cf008f6bbf5710ba583821687602ec52997a36.tar.xz linux-f0cf008f6bbf5710ba583821687602ec52997a36.zip |
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.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 11 |
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) |