diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2014-12-05 14:35:08 +0530 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2014-12-10 04:53:45 -0800 |
commit | bfc9f1f8d94db1d666e549f3e382be75839c1bf7 (patch) | |
tree | 0443415a2e634f598ae28597ad219dfc80cbdefb /libglusterfs | |
parent | b7d71e6541bc9c4a33cc5b46e93524ca1990c0bf (diff) |
cluster/afr: Associate the inode returned by inode_link() with corresponding entry
Backport of: http://review.gluster.org/9254
Change-Id: I7d2be4d41413f4df7d0b2d1d545d61f384f7a0c3
BUG: 1138897
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/9260
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/gf-dirent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libglusterfs/src/gf-dirent.c b/libglusterfs/src/gf-dirent.c index 0cda83a27c3..3b42a0813d5 100644 --- a/libglusterfs/src/gf-dirent.c +++ b/libglusterfs/src/gf-dirent.c @@ -78,6 +78,7 @@ gf_link_inodes_from_dirent (xlator_t *this, inode_t *parent, { gf_dirent_t *entry = NULL; inode_t *link_inode = NULL; + inode_t *tmp = NULL; list_for_each_entry (entry, &entries->list, list) { if (entry->inode) { @@ -86,7 +87,9 @@ gf_link_inodes_from_dirent (xlator_t *this, inode_t *parent, if (!link_inode) continue; inode_lookup (link_inode); - inode_unref (link_inode); + tmp = entry->inode; + entry->inode = link_inode; + inode_unref (tmp); } } |