diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2017-04-24 10:58:04 +0300 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-04-25 19:36:29 +0300 |
commit | e5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3 (patch) | |
tree | 7bd80fcacc5e294ea3da9623bfd352e0aa6fb970 /drivers/md/raid1.c | |
parent | 296617581eac713b3fda588216ae6d16d1e76dd5 (diff) | |
download | linux-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/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 14a9d36b25b8..70a596c10306 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1831,9 +1831,9 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev) p->rdev = repl; conf->mirrors[conf->raid_disks + number].rdev = NULL; unfreeze_array(conf); - clear_bit(WantReplacement, &rdev->flags); - } else - clear_bit(WantReplacement, &rdev->flags); + } + + clear_bit(WantReplacement, &rdev->flags); err = md_integrity_register(mddev); } abort: |