Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=25e... Commit: 25ee476443cf780579d36e0c4c695dbe06acf261 Parent: 04d7eb349f6c0625748a47b4749562cf945c78d0 Author: David Teigland teigland@redhat.com AuthorDate: Mon Aug 29 10:47:39 2011 -0500 Committer: David Teigland teigland@redhat.com CommitterDate: Mon Aug 29 10:50:21 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@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; }
cluster-commits@lists.fedorahosted.org