Grow_continue_command: ensure 'content' is properly initialised.

Grow_continue_command() call verify_reshape_position(), which assumes
that info->sys_name is initialised.
'info' in verify_reshape_position() is 'content' in Grow_continue_command().

In the st->ss->external != 0 branch of that function, sysfs_init() is called
to initialize content->sys_name.
In the st->ss->external == 0 branch, ->sys_name is not initialized so
verify_reshape_position() will not do the right thing.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
NeilBrown 2017-04-20 12:40:05 +10:00 committed by Jes Sorensen
parent b63804583e
commit a250ce240f
1 changed files with 1 additions and 0 deletions

1
Grow.c
View File

@ -5002,6 +5002,7 @@ int Grow_continue_command(char *devname, int fd,
goto Grow_continue_command_exit;
}
content = &array;
sysfs_init(content, fd, NULL);
/* Need to load a superblock.
* FIXME we should really get what we need from
* sysfs