190130
From f027734165374979bd0bff8ea059dfaadca85e07 Mon Sep 17 00:00:00 2001
190130
From: Soumya Koduri <skoduri@redhat.com>
190130
Date: Thu, 2 Jul 2020 02:07:56 +0530
190130
Subject: [PATCH 462/465] Issue with gf_fill_iatt_for_dirent
190130
190130
In "gf_fill_iatt_for_dirent()", while calculating inode_path for loc,
190130
the inode should be of parent's. Instead it is loc.inode which results in error
190130
 and eventually lookup/readdirp fails.
190130
190130
This patch fixes the same.
190130
190130
This is backport of below mainstream fix :
190130
190130
> Change-Id: Ied086234a4634e8cb13520521ac547c87b3c76b5
190130
> Fixes: #1351
190130
> Upstream patch: https://review.gluster.org/#/c/glusterfs/+/24661/
190130
190130
Change-Id: Ied086234a4634e8cb13520521ac547c87b3c76b5
190130
BUG: 1853189
190130
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
190130
Reviewed-on: https://code.engineering.redhat.com/gerrit/208691
190130
Tested-by: RHGS Build Bot <nigelb@redhat.com>
190130
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
190130
---
190130
 libglusterfs/src/gf-dirent.c | 2 +-
190130
 1 file changed, 1 insertion(+), 1 deletion(-)
190130
190130
diff --git a/libglusterfs/src/gf-dirent.c b/libglusterfs/src/gf-dirent.c
190130
index f289723..3fa67f2 100644
190130
--- a/libglusterfs/src/gf-dirent.c
190130
+++ b/libglusterfs/src/gf-dirent.c
190130
@@ -277,7 +277,7 @@ gf_fill_iatt_for_dirent(gf_dirent_t *entry, inode_t *parent, xlator_t *subvol)
190130
     gf_uuid_copy(loc.pargfid, parent->gfid);
190130
     loc.name = entry->d_name;
190130
     loc.parent = inode_ref(parent);
190130
-    ret = inode_path(loc.inode, entry->d_name, &path);
190130
+    ret = inode_path(loc.parent, entry->d_name, &path);
190130
     loc.path = path;
190130
     if (ret < 0)
190130
         goto out;
190130
-- 
190130
1.8.3.1
190130