summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2010-08-27 09:06:13 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-27 10:43:11 -0700
commit20e48cac3ced9df6af761ab85e18e2da77b0c920 (patch)
tree55745d47be03ab4631c95eb072dd93df13bed8fa
parent8cad5c4f10ae431914e015c79986470ed75319e0 (diff)
check for ENOENT after unlink system call in stop volume function
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index cbafb81ec..27493a539 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);