diff options
author | NeilBrown <neilb@suse.de> | 2010-11-22 20:58:06 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-11-22 20:58:06 +1100 |
commit | aaccda440691a5f9d5c986a90333a218db1f8a6c (patch) | |
tree | 79a7d50f61c7447de346152c0892cca88092c6be /Incremental.c | |
parent | 52e965c2969723c80fd50d393a7e15658bc217c9 (diff) |
Incr: fix up return value in try_spare
We only want to try partition_try_spare if array_try_spare failed.
If it succeeded, there is nothing more to try.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Incremental.c b/Incremental.c index 35ad221a..44e83ba3 100644 --- a/Incremental.c +++ b/Incremental.c @@ -1112,10 +1112,10 @@ static int try_spare(char *devname, int *dfdp, struct dev_policy *pol, policy_action_allows(pol, superlist[i]->name, act_spare)) partitions_ok = 1; } - rv = 0; + rv = 1; if (arrays_ok) rv = array_try_spare(devname, dfdp, pol, st, verbose); - if (rv == 0 && partitions_ok) + if (rv != 0 && partitions_ok) rv = partition_try_spare(devname, dfdp, pol, st, verbose); return rv; } |