]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow: make sure to break out of the backup loop when finished.
authorNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 23:08:24 +0000 (10:08 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 23:08:24 +0000 (10:08 +1100)
If there is nothing more to backup, then break out of the loop.

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

diff --git a/Grow.c b/Grow.c
index cdabce1f7c4ea04c59a9ee7df2c5677d3dd22375..8229b4d4e5bc0a6cdc00d4a7c707107c4cbeaf5b 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -2945,6 +2945,8 @@ int child_monitor(int afd, struct mdinfo *sra, struct reshape *reshape,
                                if (offset < suspend_point/data)
                                        break;
                        }
+                       if (actual_stripes == 0)
+                               break;
                        grow_backup(sra, offset, actual_stripes,
                                    fds, offsets,
                                    disks, chunk, level, layout,