diff options
author | NeilBrown <neilb@suse.de> | 2011-02-15 10:45:01 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-02-15 10:45:01 +1100 |
commit | 5b660791b4afb9b24b13cbf4877ea62e4e832537 (patch) | |
tree | 6859c0e4c64c193dfacbce2d62d1f2c981806190 | |
parent | b545e14a2142b946446cf80127c7c8801dab55c8 (diff) | |
download | mdadm-5b660791b4afb9b24b13cbf4877ea62e4e832537.tar.gz |
Fix regression with removing 'failed' and 'detached' devices.
If a request to remove all 'failed' or 'detached' devices chooses to
remove the first device, it will not actually try the removal and will
skip any following devices.
This fixes it.
Reported-by: Rémi Rérolle <rrerolle@lacie.com>
Tested-by: Rémi Rérolle <rrerolle@lacie.com>
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | Manage.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -421,7 +421,7 @@ int Manage_subdevs(char *devname, int fd, dnprintable = dvname; break; } - if (jnext == 0) + if (next != dv) continue; } else if (strcmp(dv->devname, "detached") == 0) { if (dv->disposition != 'r' && dv->disposition != 'f') { @@ -461,7 +461,7 @@ int Manage_subdevs(char *devname, int fd, dnprintable = dvname; break; } - if (jnext == 0) + if (next != dv) continue; } else if (strcmp(dv->devname, "missing") == 0) { if (dv->disposition != 'a' || dv->re_add == 0) { |