summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-06-01 13:34:33 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-06-16 01:30:32 -0700
commita824655de117d536b16c20ab8e38dfc698107d6a (patch)
tree96013d6c6c3d58ca02387484e3f6ddf555d3a212 /xlators/storage/posix/src/posix.c
parent96e3426354bbd166c8c0224060132479c350aa2b (diff)
storage/posix: Handle MAKE_INODE_HANDLE failures
Backport of http://review.gluster.com/11028 BUG: 1221473 Change-Id: Iefa2a9037e7a415e55581054b16c840bae56561e Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11167 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r--xlators/storage/posix/src/posix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 71b83c2e0ac..2a1df28040c 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -4921,8 +4921,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;