diff options
author | NeilBrown <neilb@suse.de> | 2009-11-06 05:22:14 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-11-06 05:22:14 +0100 |
commit | b5ea446ae7c5548b9f3d88a474dc641a6910ddaf (patch) | |
tree | dd034b7803e4a5ea1e168125cb3922241c511e7a /Grow.c | |
parent | Grow: restrict to 2.6.32 (diff) | |
download | mdadm-b5ea446ae7c5548b9f3d88a474dc641a6910ddaf.tar.xz mdadm-b5ea446ae7c5548b9f3d88a474dc641a6910ddaf.zip |
Grow: goto release rather than just return
otherwise we exit with the array frozen.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to '')
-rw-r--r-- | Grow.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -644,8 +644,10 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, layout_str = "parity-last"; } else { c = map_num(pers, level); - if (c == NULL) - return 1;/* not possible */ + if (c == NULL) { + rv = 1;/* not possible */ + goto release; + } err = sysfs_set_str(sra, NULL, "level", c); if (err) { fprintf(stderr, Name ": %s: could not set level to %s\n", @@ -849,7 +851,8 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, if (nlayout == UnSet) { fprintf(stderr, Name ": layout %s not understood for raid5.\n", layout_str); - return 1; + rv = 1; + goto release; } break; @@ -858,7 +861,8 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, if (nlayout == UnSet) { fprintf(stderr, Name ": layout %s not understood for raid6.\n", layout_str); - return 1; + rv = 1; + goto release; } break; } |