summaryrefslogtreecommitdiff
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2017-04-24 10:58:04 +0300
committerShaohua Li <shli@fb.com>2017-04-25 19:36:29 +0300
commite5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3 (patch)
tree7bd80fcacc5e294ea3da9623bfd352e0aa6fb970 /drivers/md/raid10.c
parent296617581eac713b3fda588216ae6d16d1e76dd5 (diff)
downloadlinux-e5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3.tar.xz
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.c8
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: