From d8f181d3171ed301a9992615083fcf98992577c8 Mon Sep 17 00:00:00 2001 From: Nithya Balachandran Date: Thu, 19 Feb 2015 17:30:35 +0530 Subject: Storage/posix : Adding error checks in path formation Modified a few log messages added for this fix. Also set the op_errno in an error check. Change-Id: I87caf2f89031aedad1aaee001aef54896dbecd3b BUG: 1113960 Signed-off-by: Nithya Balachandran Reviewed-on: http://review.gluster.org/9702 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Raghavendra Bhat --- xlators/storage/posix/src/posix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/storage/posix') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 04b75d083e1..ea9cb3def62 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -3456,6 +3456,7 @@ posix_get_ancestry_non_directory (xlator_t *this, inode_t *leaf_inode, MAKE_INODE_HANDLE (leaf_path, this, loc, NULL); if (!leaf_path) { GF_FREE (loc); + *op_errno = ESTALE; goto out; } GF_FREE (loc); @@ -5140,8 +5141,8 @@ posix_entry_xattr_fill (xlator_t *this, inode_t *inode, MAKE_HANDLE_PATH (entry_path, this, fd->inode->gfid, name); if (!entry_path) { gf_log (this->name, GF_LOG_WARNING, - "Failed to create handle path for %s (%s)", - name, uuid_utoa (fd->inode->gfid)); + "Failed to create handle path for %s/%s", + uuid_utoa (fd->inode->gfid), name); return NULL; } -- cgit