summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2019-08-01 13:37:07 -0400
committerAmar Tumballi <amarts@redhat.com>2019-08-04 07:09:15 +0000
commited7a3793073670e787063c47e55010fc7c963064 (patch)
treea70732a54d4f20651949429f936e4cba7823142a
parentc927bc07385b79a4f86c339cd0e0eed361090d9b (diff)
storage/posix: set the op_errno to proper errno during gfid set
In posix_gfid_set, the proper error is not captured in one of the failure cases. Change-Id: I1c13f0691a15d6893f1037b3a5fe385a99657e00 Fixes: bz#1736482 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
-rw-r--r--xlators/storage/posix/src/posix-helpers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index f35a992ffca..43d76453021 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -1012,6 +1012,7 @@ posix_gfid_set(xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req,
if (sys_lstat(path, &stat) != 0) {
ret = -1;
+ *op_errno = errno;
gf_msg(this->name, GF_LOG_ERROR, errno, P_MSG_LSTAT_FAILED,
"lstat on %s failed", path);
goto out;