From 9bd1b291e3e107250b38d05702df7cd751382bdc Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Mon, 30 Apr 2012 16:43:16 +0530 Subject: libglusterfs/inode.c: do not link the inode in the dentry cache for "." and ".." Change-Id: I18c2e090c1ca64f47ce70dc63c9f73ea7def2f86 BUG: 810828 Signed-off-by: Krishna Srinivas Reviewed-on: http://review.gluster.com/3220 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/inode.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libglusterfs/src/inode.c') diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index fed23ae35..1db829792 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -851,6 +851,11 @@ __inode_link (inode_t *inode, inode_t *parent, const char *name, } } + if (name) { + if (!strcmp(name, ".") || !strcmp(name, "..")) + return link_inode; + } + /* use only link_inode beyond this point */ if (parent) { old_dentry = __dentry_grep (table, parent, name); -- cgit