diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-06-01 13:34:33 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-06-16 00:26:33 -0700 |
commit | 476d4070dbdb9d73b36bd04f3eb3d6eda84abe73 (patch) | |
tree | 6460a03343ac8c1d670e568def7849f548d5e32d | |
parent | 70bb8bf65b4cefb503fa94452c200b0b71a06535 (diff) |
storage/posix: Handle MAKE_INODE_HANDLE failures
Change-Id: Ia176ccd4cac82c66ba50e3896fbe72c2da860c20
BUG: 1212110
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/11028
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
-rw-r--r-- | xlators/storage/posix/src/posix.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index ef0b3c0f59b..6d3be0cdc69 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -4916,8 +4916,14 @@ do_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd, _fd = pfd->fd; } - if (loc && !gf_uuid_is_null (loc->gfid)) + if (loc && !gf_uuid_is_null (loc->gfid)) { MAKE_INODE_HANDLE (real_path, this, loc, NULL); + if (!real_path) { + op_ret = -1; + op_errno = ESTALE; + goto out; + } + } if (real_path) { inode = loc->inode; |