summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/inode.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-04-27 18:43:23 +0530
committerAnand Avati <avati@redhat.com>2012-05-08 13:39:01 -0700
commit11a19ce031932640584f8bc207274f4e08d97c5f (patch)
treeee5a986280dfaac50c5868e38d28fdde13123a9a /libglusterfs/src/inode.c
parentf233e26f99decc0b2552ed10cd81c30c684139ac (diff)
Resolve: Assign correct path while resolving
Change-Id: Ia17ff38a60225dd2e9115aaa298bed42f9e43f56 BUG: 812277 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3248 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r--libglusterfs/src/inode.c7
1 files changed, 4 insertions, 3 deletions
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,
- "<gfid:%s>", uuid_utoa (itrav->gfid));
+ INODE_PATH_FMT, uuid_utoa (itrav->gfid));
buf[i-1] = '>';
}