summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2020-07-02 02:07:56 +0530
committersoumya k <skoduri@redhat.com>2020-08-12 10:56:35 +0000
commit8dfe8972ac3612b7df0789eede2fe0bfae020613 (patch)
treefd051c7c36a35840c2103b3b75f228f090ffc178
parent95f167483e5e88866fef1193a7b7e8c62e2cc065 (diff)
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. Change-Id: Ied086234a4634e8cb13520521ac547c87b3c76b5 Fixes: #1351 Signed-off-by: Soumya Koduri <skoduri@redhat.com> (cherry picked from commit ab8308333aaf033e07dbbdf2f69f9313a7e311f3)
-rw-r--r--libglusterfs/src/gf-dirent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/gf-dirent.c b/libglusterfs/src/gf-dirent.c
index 9c8c74beb54..a809efc97ef 100644
--- a/libglusterfs/src/gf-dirent.c
+++ b/libglusterfs/src/gf-dirent.c
@@ -276,7 +276,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;