diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2017-04-24 15:58:04 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-04-25 09:36:29 -0700 |
commit | e5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3 (patch) | |
tree | 7bd80fcacc5e294ea3da9623bfd352e0aa6fb970 /drivers/md/raid10.c | |
parent | 296617581eac713b3fda588216ae6d16d1e76dd5 (diff) | |
download | linux-stable-e5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3.tar.gz linux-stable-e5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3.tar.bz2 linux-stable-e5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3.zip |
md: clear WantReplacement once disk is removed
We can clear 'WantReplacement' flag directly no
matter it's replacement existed or not since the
semantic is same as before.
Also since the disk is removed from array, then
it is straightforward to remove 'WantReplacement'
flag and the comments in raid10/5 can be removed
as well.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 5de951bcd24c..2883b720a265 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1874,13 +1874,9 @@ static int raid10_remove_disk(struct mddev *mddev, struct md_rdev *rdev) * but will never see neither -- if they are careful. */ p->replacement = NULL; - clear_bit(WantReplacement, &rdev->flags); - } else - /* We might have just remove the Replacement as faulty - * Clear the flag just in case - */ - clear_bit(WantReplacement, &rdev->flags); + } + clear_bit(WantReplacement, &rdev->flags); err = md_integrity_register(mddev); abort: |