From 11a19ce031932640584f8bc207274f4e08d97c5f Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 27 Apr 2012 18:43:23 +0530 Subject: Resolve: Assign correct path while resolving Change-Id: Ia17ff38a60225dd2e9115aaa298bed42f9e43f56 BUG: 812277 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/3248 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/inode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libglusterfs/src/inode.c') diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index 1db8297923a..c1a7efc0942 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -1095,8 +1095,9 @@ __inode_path (inode_t *inode, const char *name, char **bufp) int len = 0; char *buf = NULL; - if (!inode) { - gf_log_callingfn (THIS->name, GF_LOG_WARNING, "inode not found"); + if (!inode || uuid_is_null (inode->gfid)) { + GF_ASSERT (0); + gf_log_callingfn (THIS->name, GF_LOG_WARNING, "invalid inode"); return -1; } @@ -1153,7 +1154,7 @@ __inode_path (inode_t *inode, const char *name, char **bufp) if (!__is_root_gfid (itrav->gfid)) { snprintf (&buf[i-GFID_STR_PFX_LEN], GFID_STR_PFX_LEN, - "", uuid_utoa (itrav->gfid)); + INODE_PATH_FMT, uuid_utoa (itrav->gfid)); buf[i-1] = '>'; } -- cgit