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