From 20e48cac3ced9df6af761ab85e18e2da77b0c920 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Fri, 27 Aug 2010 09:06:13 +0000 Subject: check for ENOENT after unlink system call in stop volume function Signed-off-by: Raghavendra Bhat Signed-off-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index cbafb81ec4b..27493a53928 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -861,12 +861,13 @@ glusterd_volume_stop_glusterfs (glusterd_volinfo_t *volinfo, ret = unlink (pidfile); - if (ret) { + if (ret && (ENOENT != errno)) { gf_log ("", GF_LOG_ERROR, "Unable to unlink pidfile: %s", pidfile); goto out; } + ret = 0; out: if (file) fclose (file); -- cgit