summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2019-08-01 13:37:07 -0400
committerRinku Kothiya <rkothiya@redhat.com>2019-08-22 05:58:47 +0000
commitb3e0671a4e8f9d830bf222b1bdbdb49a6f75a564 (patch)
tree2c69efb16c22896a0353513760ddc4848aaf637b /xlators
parent03b36d0d95abc4c531bc84e2ed1aa564c18f3ae2 (diff)
storage/posix: set the op_errno to proper errno during gfid setv7.0rc0
In posix_gfid_set, the proper error is not captured in one of the failure cases. Change-Id: I1c13f0691a15d6893f1037b3a5fe385a99657e00 Fixes: bz#1736481 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> (cherry picked from commit ed7a3793073670e787063c47e55010fc7c963064)
Diffstat (limited to 'xlators')
-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 a0c273fa772..abbd5917060 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;