Re: [PATCH 1/2] FIX: Use successfully loaded metadata only
From: NeilBrown <hidden>
Date: 2011-04-14 07:50:34
On Tue, 12 Apr 2011 14:51:16 +0200 Adam Kwolek [off-list ref] wrote:
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 <redacted>
Applied, thanks. NeilBrown
quoted hunk ↗ jump to hunk
--- Grow.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/Grow.c b/Grow.c index a954cfd..768278f 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) { --To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html