From a2d4c928e93c95dfe2ceff450556f8494d67e654 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Wed, 1 Mar 2017 12:48:10 +0530 Subject: storage/posix: Set ret value correctly before exiting Change-Id: I07c3a21c1c0625a517964693351356eead962571 BUG: 1427404 Signed-off-by: Krutika Dhananjay Reviewed-on: https://review.gluster.org/16792 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- xlators/storage/posix/src/posix-handle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators') 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); -- cgit