return 0;
}
-static int check_donor(struct state *from, struct state *to,
- struct domainlist *domlist)
+static int check_donor(struct state *from, struct state *to)
{
struct state *sub;
return 0;
if (from->spare <= 0)
return 0;
- if (domlist == NULL)
- return 0;
return 1;
}
to->metadata->ss->name);
if (to->spare_group)
domain_add(&domlist, to->spare_group);
-
+ /*
+ * No spare migration if the destination
+ * has no domain. Skip this array.
+ */
+ if (!domlist)
+ continue;
for (from=statelist ; from ; from=from->next) {
dev_t devid;
- if (!check_donor(from, to, domlist))
+ if (!check_donor(from, to))
continue;
if (from->metadata->ss->external)
devid = container_choose_spare(