diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-01-06 20:58:13 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-01-06 21:14:35 +0100 |
commit | 9d9938854efcf2f21381b930bc1324e95640e0c4 (patch) | |
tree | 7b136c25af5fcc64258f3427f985c1dc667ae0bd /drivers/md/md.c | |
parent | ca9ea7a5ffda53ce9e9f3e14b9b104d85db47c7d (diff) | |
parent | 3f37b26f8d57756b591383a9d8ce1cd628bc773c (diff) | |
download | linux-9d9938854efcf2f21381b930bc1324e95640e0c4.tar.bz2 |
Merge branch 'for-linus' into for-next
Conflicts:
drivers/gpu/drm/i915/intel_display.c
sound/soc/intel/skylake/skl.h
Diffstat (limited to 'drivers/md/md.c')
-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) |