FIX: Set readonly state in Grow_continue() when necessary
When assembling array using assemble_container_content() for external metadata case, array is in 'readonly' state already. There is not necessary to duplicate this operation. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
864a004f7e
commit
ef5414b282
10
Grow.c
10
Grow.c
|
@ -3325,11 +3325,13 @@ int Grow_continue(int mdfd, struct supertype *st, struct mdinfo *info,
|
|||
{
|
||||
char buf[40];
|
||||
char *container = NULL;
|
||||
int err = sysfs_set_str(info, NULL, "array_state", "readonly");
|
||||
if (err)
|
||||
return err;
|
||||
int err;
|
||||
|
||||
if (st->ss->external) {
|
||||
if (!st->ss->external) {
|
||||
err = sysfs_set_str(info, NULL, "array_state", "readonly");
|
||||
if (err)
|
||||
return err;
|
||||
} else {
|
||||
fmt_devname(buf, st->container_dev);
|
||||
container = buf;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue