]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Correctly abort level change when reshape_array fails.
authorNeilBrown <neilb@suse.de>
Tue, 11 Jan 2011 03:41:49 +0000 (14:41 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 11 Jan 2011 03:41:49 +0000 (14:41 +1100)
We were returning too early.

Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index 611b3e215dde9971fc2d85dc9ce520ba562c4e95..f9bc96fe1ee4ff35262bb91f7796d5d002e15a3b 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -2087,19 +2087,17 @@ static int reshape_array(char *container, int fd, char *devname,
 
 
  release:
-       if (rv) {
-               unfreeze(st, frozen);
-               return rv;
-       }
-       if (container)
-               ping_monitor(container);
-       if (st->ss->external) {
-               /* Re-load the metadata as much could have changed */
-               int cfd = open_dev(st->container_dev);
-               if (cfd >= 0) {
-                       st->ss->free_super(st);
-                       st->ss->load_container(st, cfd, container);
-                       close(cfd);
+       if (!rv) {
+               if (container)
+                       ping_monitor(container);
+               if (st->ss->external) {
+                       /* Re-load the metadata as much could have changed */
+                       int cfd = open_dev(st->container_dev);
+                       if (cfd >= 0) {
+                               st->ss->free_super(st);
+                               st->ss->load_container(st, cfd, container);
+                               close(cfd);
+                       }
                }
        }
        if (rv && orig_level != UnSet && sra) {