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