summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index abdc756..705373f 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -841,14 +841,19 @@ libgf_client_loc_fill (loc_t *loc,
if (!inode) {
if (ino)
inode = inode_search (ctx->itable, ino, NULL);
+
+ if (inode)
+ goto inode_found;
+
if (par && name)
inode = inode_search (ctx->itable, par, name);
-
- loc->inode = inode;
}
- if (inode)
+inode_found:
+ if (inode) {
loc->ino = inode->ino;
+ loc->inode = inode;
+ }
parent = loc->parent;
if (!parent) {