cluster/afr: Associate the inode returned by inode_link() with corresponding entry

Change-Id: Ic4436a64075a2615a2293cdfdf2ba6622827cafa
BUG: 1129939
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/9254
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
This commit is contained in:
Krutika Dhananjay 2014-12-05 14:35:08 +05:30 committed by Vijay Bellur
parent ecb58c9a3f
commit ad1ed80060

View File

@ -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);
}
}