From 07e29eabdf3fc3cede375a2ac63635dc5dbc385a Mon Sep 17 00:00:00 2001
From: Pranith Kumar K <pkarampu@redhat.com>
Date: Mon, 1 Jun 2015 13:34:33 +0530
Subject: [PATCH 46/57] storage/posix: Handle MAKE_INODE_HANDLE failures
Backport of http://review.gluster.com/11028
Change-Id: Ia176ccd4cac82c66ba50e3896fbe72c2da860c20
BUG: 1228496
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/50506
---
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 71b83c2..2a1df28 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;
--
1.7.1