Gitweb: http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=a6e07ad59a7... Commit: a6e07ad59a764effe13bd02bbc22c0e25b2e225b Parent: 476b8ebba327d27e4610b513817aa3ebb6fbb6fd 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:51:42 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