diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-04-27 18:43:23 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-05-08 13:39:01 -0700 |
commit | 11a19ce031932640584f8bc207274f4e08d97c5f (patch) | |
tree | ee5a986280dfaac50c5868e38d28fdde13123a9a /xlators | |
parent | f233e26f99decc0b2552ed10cd81c30c684139ac (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.c | 5 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-resolve.c | 15 |
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 abb11dbb..b1eff83d 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 4992fb53..e44fc2de 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) { |