From c1c5075df463fd298418bf31384b6d92f84d194b Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Fri, 16 Oct 2015 09:57:22 -0400 Subject: fuse: Avoid redundant lookup on "." and ".." credit: R. Gowdappa Change-Id: I3bc1534e499f2eccd114db69a29c0b2ce82775db BUG: 1273315 Reviewed-on: http://review.gluster.org/12374 Reviewed-by: Raghavendra G Tested-by: Raghavendra G --- xlators/mount/fuse/src/fuse-bridge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/mount') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 4b390ee9d69..c8b72dac8bc 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -2807,7 +2807,9 @@ fuse_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, feo->nodeid = inode_to_fuse_nodeid (linked_inode); - inode_set_need_lookup (linked_inode, this); + if (!((strcmp (entry->d_name, ".") == 0) || + (strcmp (entry->d_name, "..") == 0))) + inode_set_need_lookup (linked_inode, this); inode_unref (linked_inode); -- cgit