From 2a004fbcc9296ee055b1957d1812552848ae7a0d Mon Sep 17 00:00:00 2001 From: Kinglong Mee Date: Thu, 1 Feb 2018 14:53:48 +0800 Subject: 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 --- api/src/glfs-fops.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'api') 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 -- cgit