summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Assemble.c15
-rw-r--r--config.c3
-rw-r--r--mdadm.c2
-rw-r--r--mdadm.h2
4 files changed, 7 insertions, 15 deletions
diff --git a/Assemble.c b/Assemble.c
index b3a214a7..4b9b4089 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -391,22 +391,21 @@ int Assemble(struct supertype *st, char *mddev,
fprintf(stderr, Name ": looking in container %s\n",
devname);
- tmpdev->content = tst->ss->container_content(tst, NULL);
+ content = tst->ss->container_content(tst, NULL);
next_member:
- if (tmpdev->content)
- content = tmpdev->content;
if (!content)
goto loop; /* empty container */
- tmpdev->content = content->next;
- if (tmpdev->content == NULL)
+ if (content->next == NULL)
tmpdev->used = 2;
if (!ident_matches(ident, content, tst,
homehost, update,
- report_missmatch ? devname : NULL))
+ report_missmatch ? devname : NULL)) {
+ content = content->next;
goto next_member;
+ }
/* we have the one container we need, don't keep
* looking. If the chosen member is active, skip.
@@ -417,11 +416,11 @@ int Assemble(struct supertype *st, char *mddev,
content->text_version,
devname);
skip:
- if (tmpdev->content)
+ content = content->next;
+ if (content)
goto next_member;
tst->ss->free_super(tst);
tst = NULL;
- content = NULL;
if (auto_assem)
goto loop;
dev_policy_free(pol);
diff --git a/config.c b/config.c
index f4d46ff4..1f78c689 100644
--- a/config.c
+++ b/config.c
@@ -260,7 +260,6 @@ struct mddev_dev *load_partitions(void)
d->devname = strdup(name);
d->next = rv;
d->used = 0;
- d->content = NULL;
rv = d;
}
fclose(f);
@@ -290,7 +289,6 @@ struct mddev_dev *load_containers(void)
}
d->next = rv;
d->used = 0;
- d->content = NULL;
rv = d;
}
free_mdstat(mdstat);
@@ -964,7 +962,6 @@ struct mddev_dev *conf_get_devs()
t->devname = strdup(globbuf.gl_pathv[i]);
t->next = dlist;
t->used = 0;
- t->content = NULL;
dlist = t;
/* printf("one dev is %s\n", t->devname);*/
}
diff --git a/mdadm.c b/mdadm.c
index efb2e67b..4a854748 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -265,7 +265,6 @@ int main(int argc, char *argv[])
dv->writemostly = writemostly;
dv->re_add = re_add;
dv->used = 0;
- dv->content = NULL;
dv->next = NULL;
*devlistend = dv;
devlistend = &dv->next;
@@ -320,7 +319,6 @@ int main(int argc, char *argv[])
dv->writemostly = writemostly;
dv->re_add = re_add;
dv->used = 0;
- dv->content = NULL;
dv->next = NULL;
*devlistend = dv;
devlistend = &dv->next;
diff --git a/mdadm.h b/mdadm.h
index 614dc690..6d1169b1 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -337,8 +337,6 @@ struct mddev_dev {
char writemostly; /* 1 for 'set writemostly', 2 for 'clear writemostly' */
char re_add;
char used; /* set when used */
- struct mdinfo *content; /* If devname is a container, this might list
- * the remaining member arrays. */
struct mddev_dev *next;
};