summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2016-04-26 14:52:29 +0530
committerNiels de Vos <ndevos@redhat.com>2016-04-27 07:26:44 -0700
commit537557da59876536d33cd25a8ef485e7b5fe8849 (patch)
treed4df00a2303c7a230d8b1664e2062e2209aa897e
parent2a6c6de35130328cfb6f95a6d7794dcb01b4004d (diff)
gfapi: set need_lookup flag on response list
We set need_lookup flag for entries returned by readdirp to force lookup. Currently we are setting on the previously stored list, rather than response list returned by readdirp. This patch will iterate over current list returned by readdirp and will set need_lookup flag. Change-Id: Ibd6fcbc188f4c87f40ece7a9dcda27645401c240 BUG: 1330476 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/14073 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--api/src/glfs-fops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index c981297b0b9..25492ef2447 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -2505,7 +2505,7 @@ glfd_entry_refresh (struct glfs_fd *glfd, int plus)
* to a race where a fop comes after inode link
* but before setting need_lookup flag.
*/
- list_for_each_entry (entry, &glfd->entries, list) {
+ list_for_each_entry (entry, &entries.list, list) {
if (entry->inode)
inode_set_need_lookup (entry->inode, THIS);
}