Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280522
b: refs/heads/master
c: b014f14
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown committed Dec 22, 2011
1 parent 86312ad commit 77a5447
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f19ccb2fd70deb1f278be5e75076074cfddee46
refs/heads/master: b014f14c81bc5db4e40e2a4db10998fd79c1c64c
6 changes: 6 additions & 0 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,9 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
int number = rdev->raid_disk;
struct mirror_info *p = conf->mirrors+ number;

if (rdev != p->rdev)
p = conf->mirrors + conf->raid_disks + number;

print_conf(conf);
if (rdev == p->rdev) {
if (test_bit(In_sync, &rdev->flags) ||
Expand All @@ -1359,6 +1362,9 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
err = -EBUSY;
p->rdev = rdev;
goto abort;
} else {
clear_bit(Replacement, &rdev->flags);
clear_bit(WantReplacement, &rdev->flags);
}
err = md_integrity_register(mddev);
}
Expand Down

0 comments on commit 77a5447

Please sign in to comment.