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