From a25cdf135f01ebeb64a4497df1bb5146bfdc6620 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 13 Jun 2014 11:45:53 +0530 Subject: Use common loc-touchup in fuse/server/gfapi Change-Id: Id41fb29480bb6d22c34469339163da05b98c1a98 BUG: 1115907 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/8226 Reviewed-by: Shyamsundar Ranganathan Tested-by: Gluster Build System Reviewed-by: Niels de Vos Reviewed-by: Vijay Bellur --- xlators/mount/fuse/src/fuse-resolve.c | 18 +----------------- xlators/protocol/server/src/server-resolve.c | 14 +------------- 2 files changed, 2 insertions(+), 30 deletions(-) (limited to 'xlators') diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c index 25abe162e6c..5aaa32ea660 100644 --- a/xlators/mount/fuse/src/fuse-resolve.c +++ b/xlators/mount/fuse/src/fuse-resolve.c @@ -33,27 +33,11 @@ fuse_resolve_loc_touchup (fuse_state_t *state) { fuse_resolve_t *resolve = NULL; loc_t *loc = NULL; - char *path = NULL; - int ret = 0; resolve = state->resolve_now; loc = state->loc_now; - if (!loc->path) { - if (loc->parent && resolve->bname) { - ret = inode_path (loc->parent, resolve->bname, &path); - uuid_copy (loc->pargfid, loc->parent->gfid); - loc->name = resolve->bname; - } else if (loc->inode) { - ret = inode_path (loc->inode, NULL, &path); - uuid_copy (loc->gfid, loc->inode->gfid); - } - if (ret) - gf_log (THIS->name, GF_LOG_TRACE, - "return value inode_path %d", ret); - loc->path = path; - } - + loc_touchup (loc, resolve->bname); return 0; } diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c index 3b787c61734..9528259970a 100644 --- a/xlators/protocol/server/src/server-resolve.c +++ b/xlators/protocol/server/src/server-resolve.c @@ -42,19 +42,7 @@ resolve_loc_touchup (call_frame_t *frame) resolve = state->resolve_now; loc = state->loc_now; - if (!loc->path) { - if (loc->parent && resolve->bname) { - ret = inode_path (loc->parent, resolve->bname, &path); - loc->name = resolve->bname; - } else if (loc->inode) { - ret = inode_path (loc->inode, NULL, &path); - } - if (ret) - gf_log (frame->this->name, GF_LOG_TRACE, - "return value inode_path %d", ret); - loc->path = path; - } - + loc_touchup (loc, resolve->bname); return 0; } -- cgit