From 8046e1ea6d185c3577f2e9001d3507931cd1d27b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 13 Jul 2012 15:03:56 -0700 Subject: Restore original lock file semantics Don't fail if lock file already exists --- src/cstore/unionfs/cstore-unionfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp index 7cfe23d..e21e660 100644 --- a/src/cstore/unionfs/cstore-unionfs.cpp +++ b/src/cstore/unionfs/cstore-unionfs.cpp @@ -706,7 +706,7 @@ UnionfsCstore::getCommitLock() int fd; fd = open(C_COMMIT_LOCK_FILE.c_str(), - O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0666); + O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666); if (fd < 0) { // should not happen since all commit processes should have write access output_internal("getCommitLock() failed to open lock file\n"); -- cgit v1.2.3