summaryrefslogtreecommitdiffstats
path: root/xlators
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 /xlators
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 'xlators')
-rw-r--r--xlators/mount/fuse/src/fuse-resolve.c5
-rw-r--r--xlators/protocol/server/src/server-resolve.c15
2 files changed, 7 insertions, 13 deletions
diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c
index abb11dbb1..b1eff83dc 100644
--- a/xlators/mount/fuse/src/fuse-resolve.c
+++ b/xlators/mount/fuse/src/fuse-resolve.c
@@ -197,12 +197,11 @@ fuse_resolve_gfid (fuse_state_t *state)
}
resolve_loc->inode = inode_new (state->itable);
- ret = inode_path (resolve_loc->inode, NULL,
- (char **)&resolve_loc->path);
+ ret = loc_path (resolve_loc, NULL);
if (ret <= 0) {
gf_log (THIS->name, GF_LOG_WARNING,
- "failed to get the path from inode %s",
+ "failed to get the path for inode %s",
uuid_utoa (resolve->gfid));
}
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c
index 4992fb530..e44fc2de3 100644
--- a/xlators/protocol/server/src/server-resolve.c
+++ b/xlators/protocol/server/src/server-resolve.c
@@ -179,17 +179,13 @@ resolve_gfid (call_frame_t *frame)
resolve = state->resolve_now;
resolve_loc = &resolve->resolve_loc;
- if (!uuid_is_null (resolve->pargfid)) {
+ if (!uuid_is_null (resolve->pargfid))
uuid_copy (resolve_loc->gfid, resolve->pargfid);
- resolve_loc->inode = inode_new (state->itable);
- ret = inode_path (resolve_loc->inode, NULL,
- (char **)&resolve_loc->path);
- } else if (!uuid_is_null (resolve->gfid)) {
+ else if (!uuid_is_null (resolve->gfid))
uuid_copy (resolve_loc->gfid, resolve->gfid);
- resolve_loc->inode = inode_new (state->itable);
- ret = inode_path (resolve_loc->inode, NULL,
- (char **)&resolve_loc->path);
- }
+
+ resolve_loc->inode = inode_new (state->itable);
+ ret = loc_path (resolve_loc, NULL);
STACK_WIND (frame, resolve_gfid_cbk,
BOUND_XL (frame), BOUND_XL (frame)->fops->lookup,
@@ -197,7 +193,6 @@ resolve_gfid (call_frame_t *frame)
return 0;
}
-
int
resolve_continue (call_frame_t *frame)
{