diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2019-08-01 13:37:07 -0400 |
---|---|---|
committer | hari gowtham <hari.gowtham005@gmail.com> | 2019-09-23 07:08:38 +0000 |
commit | e9fd07ded055387a475a6047a2a4a1947e3d0a16 (patch) | |
tree | 4dbfffc1ca7d053a23e76066cdf4bbbec67cab57 /xlators | |
parent | 3f4f2c50579211f9cc4a2bcc18988f5e819d6c91 (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#1746118
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.c | 1 |
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 37e33a918bb..00690b4a141 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -1017,6 +1017,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; |