From ad73653d36c9bd59872479e3c41f8942c70945b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Nov 2024 12:40:59 +0100 Subject: Adding upstream version 4.3+20241108. Signed-off-by: Daniel Baumann --- Assemble.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'Assemble.c') diff --git a/Assemble.c b/Assemble.c index 77f2b50..87d1ae0 100644 --- a/Assemble.c +++ b/Assemble.c @@ -23,6 +23,8 @@ */ #include "mdadm.h" +#include "xmalloc.h" + #include mapping_t assemble_statuses[] = { @@ -114,14 +116,11 @@ static int is_member_busy(char *metadata_version) int busy = 0; for (ent = mdstat; ent; ent = ent->next) { - if (ent->metadata_version == NULL) - continue; - if (strncmp(ent->metadata_version, "external:", 9) != 0) - continue; - if (!is_subarray(&ent->metadata_version[9])) + if (!is_mdstat_ent_subarray(ent)) continue; + /* Skip first char - it can be '/' or '-' */ - if (strcmp(&ent->metadata_version[10], metadata_version+1) == 0) { + if (strcmp(&ent->metadata_version[10], metadata_version + 1) == 0) { busy = 1; break; } @@ -1574,8 +1573,7 @@ try_again: /* Ignore 'host:' prefix of name */ name = strchr(name, ':')+1; - mdfd = create_mddev(mddev, name, ident->autof, trustworthy, - chosen_name, 0); + mdfd = create_mddev(mddev, name, trustworthy, chosen_name, 0); } if (mdfd < 0) { st->ss->free_super(st); -- cgit v1.2.3