From ed7a3793073670e787063c47e55010fc7c963064 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Thu, 1 Aug 2019 13:37:07 -0400 Subject: 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 --- xlators/storage/posix/src/posix-helpers.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit