diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-07-19 16:14:59 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-07-25 01:15:52 +0000 |
commit | 669868d23eaeba42809fca7be134137c607d64ed (patch) | |
tree | c4b00e61f9ab3cf61cbabb38d622880f268f5508 /xlators/storage/posix/src/posix.c | |
parent | 1431786305055e0fe90e012e03278f504a2d8d14 (diff) |
storage/posix: Use the ret value of posix_gfid_heal()
... to make the change in commit acf8cfdf truly useful.
Without this, a race between entry creation fops and lookup
at posix layer can cause lookups to fail with ENODATA, as
opposed to ENOENT.
Change-Id: I44a226872283a25f1f4812f03f68921c5eb335bb
BUG: 1472758
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/17821
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 92a2f3772cb..180da9e2c08 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -216,7 +216,12 @@ posix_lookup (call_frame_t *frame, xlator_t *this, MAKE_ENTRY_HANDLE (real_path, par_path, this, loc, &buf); if (gf_uuid_is_null (loc->inode->gfid)) { - posix_gfid_heal (this, real_path, loc, xdata); + op_ret = posix_gfid_heal (this, real_path, loc, xdata); + if (op_ret < 0) { + op_errno = -op_ret; + op_ret = -1; + goto out; + } MAKE_ENTRY_HANDLE (real_path, par_path, this, loc, &buf); } |