From 77f8d358b574797453299ca9a3094b02552d02de Mon Sep 17 00:00:00 2001 From: Adam Kwolek Date: Thu, 14 Apr 2011 17:50:17 +1000 Subject: [PATCH] FIX: Use successfully loaded metadata only Values greater than 0, means error. We exit from loop on error with empty super-block pointer when sd pointer is valid. This cannot be detected by check condition as error. For sure we shouldn't go forward with error condition. It leads to throwing exception with core file when metadata handler wants to access non existing super-block. Signed-off-by: Adam Kwolek Signed-off-by: NeilBrown --- Grow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Grow.c b/Grow.c index d4308bcf..017a79db 100644 --- a/Grow.c +++ b/Grow.c @@ -2933,7 +2933,7 @@ int child_monitor(int afd, struct mdinfo *sra, struct reshape *reshape, continue; ok = st->ss->load_super(st, devfd, NULL); close(devfd); - if (ok >= 0) + if (ok == 0) break; } if (!sd) { -- 2.47.2