Remove partitions from a device before adding it to an array.

The 'remove_partitions' call is in the wrong place and applying
to the wrong file.
This commit is contained in:
Neil Brown 2007-10-19 14:03:17 +10:00
parent 570510ba32
commit 25037aa872
1 changed files with 1 additions and 1 deletions

View File

@ -306,6 +306,7 @@ int Manage_subdevs(char *devname, int fd,
dv->devname, strerror(errno)); dv->devname, strerror(errno));
return 1; return 1;
} }
remove_partitions(tfd);
if (array.not_persistent==0) if (array.not_persistent==0)
st->ss->load_super(st, tfd, &osuper, NULL); st->ss->load_super(st, tfd, &osuper, NULL);
/* will use osuper later */ /* will use osuper later */
@ -361,7 +362,6 @@ int Manage_subdevs(char *devname, int fd,
close(dfd); close(dfd);
continue; continue;
} }
remove_partitions(dfd);
close(dfd); close(dfd);
break; break;
} }