diff options
author | Shaohua Li <shli@fb.com> | 2016-12-08 18:48:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-12 05:39:34 -0500 |
commit | 60a931c20d1a401b79ff742142225c300d545af0 (patch) | |
tree | 8247789838a0ce5b65bcea06786b3c55c1ccd498 /drivers/md | |
parent | d33a490770e5b5bde66b2773b6e0162039dae11a (diff) |
md: MD_RECOVERY_NEEDED is set for mddev->recovery
commit 82a301cb0ea2df8a5c88213094a01660067c7fb4 upstream.
Fixes: 90f5f7ad4f38("md: Wait for md_check_recovery before attempting device
removal.")
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 2089d46b0eb8..1a9131b6594c 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -6829,7 +6829,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, | |||
6829 | /* need to ensure recovery thread has run */ | 6829 | /* need to ensure recovery thread has run */ |
6830 | wait_event_interruptible_timeout(mddev->sb_wait, | 6830 | wait_event_interruptible_timeout(mddev->sb_wait, |
6831 | !test_bit(MD_RECOVERY_NEEDED, | 6831 | !test_bit(MD_RECOVERY_NEEDED, |
6832 | &mddev->flags), | 6832 | &mddev->recovery), |
6833 | msecs_to_jiffies(5000)); | 6833 | msecs_to_jiffies(5000)); |
6834 | if (cmd == STOP_ARRAY || cmd == STOP_ARRAY_RO) { | 6834 | if (cmd == STOP_ARRAY || cmd == STOP_ARRAY_RO) { |
6835 | /* Need to flush page cache, and ensure no-one else opens | 6835 | /* Need to flush page cache, and ensure no-one else opens |