Grow: fix crash when restarting an array.
After the 'started' label it is assumed that 'sra' is set, so better set it when jumping there. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
6a23fb9d0d
commit
dfa4d769f0
10
Grow.c
10
Grow.c
|
@ -2835,6 +2835,16 @@ static int reshape_array(char *container, int fd, char *devname,
|
|||
return 0;
|
||||
if (restart & RESHAPE_NO_BACKUP)
|
||||
return 0;
|
||||
|
||||
/* Need 'sra' down at 'started:' */
|
||||
sra = sysfs_read(fd, NULL,
|
||||
GET_COMPONENT|GET_DEVS|GET_OFFSET|GET_STATE|GET_CHUNK|
|
||||
GET_CACHE);
|
||||
if (!sra) {
|
||||
pr_err("%s: Cannot get array details from sysfs\n",
|
||||
devname);
|
||||
goto release;
|
||||
}
|
||||
goto started;
|
||||
}
|
||||
/* The container is frozen but the array may not be.
|
||||
|
|
Loading…
Reference in New Issue