cluster: RHEL6 - dlm_controld: quiet mkdir EEXIST message

David Teigland teigland at fedoraproject.org
Mon Aug 29 15:49:40 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5e5ba6d571d626412249070e4889507145deda51
Commit:        5e5ba6d571d626412249070e4889507145deda51
Parent:        89fc6dab71b106e7d9f81bd29802ec20ee01bd5f
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Mon Aug 29 10:47:39 2011 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Mon Aug 29 10:47:39 2011 -0500

dlm_controld: quiet mkdir EEXIST message

EEXIST is fine, don't log an error about it

bz 732991

Signed-off-by: David Teigland <teigland at redhat.com>
---
 group/dlm_controld/action.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/group/dlm_controld/action.c b/group/dlm_controld/action.c
index 65918aa..0570a2f 100644
--- a/group/dlm_controld/action.c
+++ b/group/dlm_controld/action.c
@@ -309,13 +309,11 @@ static int create_path(const char *path)
 
 	old_umask = umask(0022);
 	rv = mkdir(path, 0777);
-	umask(old_umask);
-
-	if (rv < 0) {
+	if (rv < 0 && errno == EEXIST)
+		rv = 0;
+	if (rv < 0)
 		log_error("%s: mkdir failed: %d", path, errno);
-		if (errno == EEXIST)
-			rv = 0;
-	}
+	umask(old_umask);
 	return rv;
 }
 


More information about the cluster-commits mailing list