From cfaf9989e63dda0cc8e4e2c5e42bcd4ad4e43c4b Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 2 May 2012 11:59:35 +0530 Subject: stripe: don't send parent pointer in stripe_readdirp_lookup() Change-Id: I53e28f4046c13ad13c9300990a95480a5c62f180 BUG: 808353 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.com/3232 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/stripe/src/stripe.c | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'xlators/cluster/stripe') diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index 627e17dca..1e2e7cac7 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -3918,12 +3918,9 @@ stripe_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, stripe_local_t *local = NULL; call_frame_t *prev = NULL; gf_dirent_t *local_entry = NULL; - int32_t ret = -1; gf_dirent_t *tmp_entry = NULL; xlator_list_t *trav = NULL; loc_t loc = {0, }; - inode_t *inode = NULL; - char *path; int32_t count = 0; stripe_private_t *priv = NULL; int32_t subvols = 0; @@ -3969,7 +3966,6 @@ unlock: if (xattrs) (void) stripe_xattr_request_build (this, xattrs, 0, 0, 0); count = op_ret; - ret = 0; list_for_each_entry_safe (local_entry, tmp_entry, (&local->entries.list), list) { @@ -3985,28 +3981,6 @@ unlock: continue; } - inode = inode_new (local->fd->inode->table); - if (!inode) - goto out; - - loc.inode = inode; - loc.parent = local->fd->inode; - ret = inode_path (local->fd->inode, local_entry->d_name, &path); - if (ret != -1) { - loc.path = path; - } else if (inode) { - ret = inode_path (inode, NULL, &path); - if (ret != -1) { - loc.path = path; - } else { - goto out; - } - } - - loc.name = strrchr (loc.path, '/'); - loc.name++; - uuid_copy (loc.gfid, local_entry->d_stat.ia_gfid); - local_frame = copy_frame (frame); if (!local_frame) { @@ -4022,6 +3996,10 @@ unlock: goto out; } + loc.inode = inode_ref (local_entry->inode); + + uuid_copy (loc.gfid, local_entry->d_stat.ia_gfid); + local_ent->orig_frame = frame; local_ent->call_count = subvols; @@ -4037,7 +4015,7 @@ unlock: &loc, xattrs); trav = trav->next; } - inode_unref (loc.inode); + loc_wipe (&loc); } out: if (!count) { -- cgit