summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2017-03-01 12:48:10 +0530
committerJeff Darcy <jdarcy@redhat.com>2017-03-01 12:35:59 -0500
commita2d4c928e93c95dfe2ceff450556f8494d67e654 (patch)
tree252bc0f6be2b47093673098341cfffc98a40106a
parent9babd965ba885ca8bea4c58e708a3b9f0d6f076c (diff)
storage/posix: Set ret value correctly before exiting
Change-Id: I07c3a21c1c0625a517964693351356eead962571 BUG: 1427404 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/16792 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r--tests/bitrot/bug-1373520.t3
-rw-r--r--xlators/storage/posix/src/posix-handle.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/bitrot/bug-1373520.t b/tests/bitrot/bug-1373520.t
index d8e7d52d600..225d3b1a9bc 100644
--- a/tests/bitrot/bug-1373520.t
+++ b/tests/bitrot/bug-1373520.t
@@ -56,6 +56,3 @@ TEST cat $M0/HL_FILE1
EXPECT_WITHIN $HEAL_TIMEOUT "$SIZE" path_size $B0/${V0}5/HL_FILE1
cleanup;
-
-#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=1427404
-#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=1427404
diff --git a/xlators/storage/posix/src/posix-handle.c b/xlators/storage/posix/src/posix-handle.c
index ef56d105d7e..3c8e2417188 100644
--- a/xlators/storage/posix/src/posix-handle.c
+++ b/xlators/storage/posix/src/posix-handle.c
@@ -978,8 +978,10 @@ posix_create_link_if_gfid_exists (xlator_t *this, uuid_t gfid, char *real_path,
if (ret)
goto unlock;
- if (ctx->unlink_flag != GF_UNLINK_TRUE)
+ if (ctx->unlink_flag != GF_UNLINK_TRUE) {
+ ret = -1;
goto unlock;
+ }
POSIX_GET_FILE_UNLINK_PATH (priv->base_path, gfid,
unlink_path);