summaryrefslogtreecommitdiff
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-12-05 10:35:16 +1100
committerNeilBrown <neilb@suse.de>2013-12-05 10:35:16 +1100
commit8832342d3aad09d3c86af6dc9b137d6fd83af1ae (patch)
tree7a5c843a1a1f3de1d546abea41cd9cc3d4074391 /Assemble.c
parent5dd29dafa26f1745ef055de1a035317d75c0e4ed (diff)
Assemble/Incremental: don't hold O_EXCL on mddev after assembly.
As soon as the array is assembled, udev or systemd might run fsck and mount it. So we need to drop O_EXCL promptly. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Assemble.c b/Assemble.c
index 44e905bb..7e8e7957 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1037,6 +1037,7 @@ static int start_array(int mdfd,
} else
#endif
rv = ioctl(mdfd, RUN_ARRAY, NULL);
+ reopen_mddev(mdfd); /* drop O_EXCL */
if (rv == 0) {
if (c->verbose >= 0) {
pr_err("%s has been started with %d drive%s",