summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/stripe/src
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-05-02 11:59:35 +0530
committerAnand Avati <avati@redhat.com>2012-05-03 23:01:58 -0700
commitcfaf9989e63dda0cc8e4e2c5e42bcd4ad4e43c4b (patch)
tree0467d0025de8082468b34b3168ee63121dadd368 /xlators/cluster/stripe/src
parente4b3c0d90c46e6dde97f57fa93ed215b0d34e0c4 (diff)
stripe: don't send parent pointer in stripe_readdirp_lookup()
Change-Id: I53e28f4046c13ad13c9300990a95480a5c62f180 BUG: 808353 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3232 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/stripe/src')
-rw-r--r--xlators/cluster/stripe/src/stripe.c32
1 files changed, 5 insertions, 27 deletions
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) {