summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinglong Mee <mijinlong@open-fs.com>2018-02-01 14:53:48 +0800
committerAmar Tumballi <amarts@redhat.com>2018-02-08 19:16:41 +0000
commit2a004fbcc9296ee055b1957d1812552848ae7a0d (patch)
tree7c9c440dc94a1a997ee28b281904bf456de23fbf
parent04dfa27c6feb39f1e3785ec3d753b3ed1fb21aba (diff)
libgfapi: Remove need_lookup from readdirp
The inode_set_need_lookup is removed from fuse_readdirp_cbk at http://lists.gluster.org/pipermail/gluster-devel/2017-August/053505.html https://review.gluster.org/#/c/17985/ Remove the same logical from glfd_entry_refresh too. Change-Id: Ic0d7b59d4d4ed8315bf4c5e87e8e1133bcf95401 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
-rw-r--r--api/src/glfs-fops.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index bb51f729562..d3deb746406 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -2745,16 +2745,9 @@ glfd_entry_refresh (struct glfs_fd *glfd, int plus)
DECODE_SYNCOP_ERR (ret);
if (ret >= 0) {
if (plus) {
- /**
- * Set inode_needs_lookup flag before linking the
- * inode. Doing it later post linkage might lead
- * to a race where a fop comes after inode link
- * but before setting need_lookup flag.
- */
list_for_each_entry (entry, &entries.list, list) {
- if (entry->inode)
- inode_set_need_lookup (entry->inode, THIS);
- else if (!IA_ISDIR (entry->d_stat.ia_type)) {
+ if (!entry->inode &&
+ !IA_ISDIR (entry->d_stat.ia_type)) {
/* entry->inode for directories will be
* always set to null to force a lookup
* on the dentry. Also we will have