summaryrefslogtreecommitdiffstats
path: root/xlators/features/gfid-access/src/gfid-access.c
diff options
context:
space:
mode:
authorAjeet Jha <ajha@redhat.com>2014-01-16 17:25:49 +0530
committerVijay Bellur <vbellur@redhat.com>2014-01-28 02:07:12 -0800
commit2ef4e5a9913508bc7e371918a28adb3eb0eadbe4 (patch)
tree7590477b74aa6672052d6d4c043d4d986b5f0e7e /xlators/features/gfid-access/src/gfid-access.c
parentc8975995d711e1bffe8acbb4650abc0d3bbea055 (diff)
features/gfid-access: populating inode during virtual_lookup_cbk.
Setting appropriate ia_type and gfid for the inode, obtained during virtual_lookup_cbk of a directory by doing an "inode_link". Change-Id: I9582570c82e70ff5f1d4e441f9e9868ef82e9dc6 BUG: 1054199 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6723 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@gmail.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/gfid-access/src/gfid-access.c')
-rw-r--r--xlators/features/gfid-access/src/gfid-access.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c
index a2bcbb74b..362fdab5a 100644
--- a/xlators/features/gfid-access/src/gfid-access.c
+++ b/xlators/features/gfid-access/src/gfid-access.c
@@ -263,6 +263,8 @@ ga_fill_tmp_loc (loc_t *loc, xlator_t *this, uuid_t gfid,
ret = inode_ctx_get (loc->inode, this, &value);
if (!ret) {
parent = (void *)value;
+ if (uuid_is_null (parent->gfid))
+ parent = loc->inode;
}
/* parent itself should be looked up */
@@ -627,7 +629,8 @@ ga_virtual_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* the inode is not present in itable, ie, the actual
path is not yet looked up. Use the current inode
itself for now */
- inode_ref (inode);
+
+ inode_link (inode, NULL, NULL, buf);
} else {
/* 'inode_ref()' has been done in inode_find() */
inode = true_inode;