summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2015-10-16 09:57:22 -0400
committerRaghavendra G <rgowdapp@redhat.com>2015-10-29 01:32:32 -0700
commitc1c5075df463fd298418bf31384b6d92f84d194b (patch)
tree65420c518211053ef5f60623ba77f5d626f799de /xlators/mount
parenta53c5c8e322e30b865b7c69aa9558474e033c89a (diff)
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 <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/mount')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c4
1 files changed, 3 insertions, 1 deletions
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);