From: Artur Paszkiewicz Date: Tue, 9 Aug 2016 08:05:51 +0000 (+0200) Subject: Incremental: don't try to load_container() for a subarray X-Git-Tag: mdadm-4.0~74 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=c01222305657378be96f2f9fe359ba33f914c177;p=mdadm.git Incremental: don't try to load_container() for a subarray mdadm -IRs would exit with a non-zero status because of this. Reported-by: Xiao Ni Signed-off-by: Artur Paszkiewicz Signed-off-by: Jes Sorensen --- diff --git a/Incremental.c b/Incremental.c index ba97b008..cc01d41e 100644 --- a/Incremental.c +++ b/Incremental.c @@ -1347,8 +1347,12 @@ restart: if (devnm && strcmp(devnm, me->devnm) != 0) continue; - if (devnm && me->metadata[0] == '/') { + if (me->metadata[0] == '/') { char *sl; + + if (!devnm) + continue; + /* member array, need to work on container */ strncpy(container, me->metadata+1, 32); container[31] = 0;