Skip to content

Commit 56bbc58

Browse files
committed
Assemble: change load_devices to return most_recent 'st' value.
This means that st->ss->getinfo_super(st, content, NULL); clean = content->array.state & 1; will get an up-to-date value for 'clean'. This fix allows tests/03r5assem-failed to work. Signed-off-by: NeilBrown <[email protected]>
1 parent 9ee314d commit 56bbc58

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Assemble.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,12 @@ static int load_devices(struct devs *devices, char *devmap,
703703
if (devices[devcnt].i.disk.state == 6) {
704704
if (most_recent < 0 ||
705705
devices[devcnt].i.events
706-
> devices[most_recent].i.events)
706+
> devices[most_recent].i.events) {
707+
struct supertype *tmp = tst;
708+
tst = st;
709+
st = tmp;
707710
most_recent = devcnt;
711+
}
708712
}
709713
tst->ss->free_super(tst);
710714
free(tst);

0 commit comments

Comments
 (0)