From: Benjamin Coddington Date: Wed, 10 Sep 2014 18:09:20 +0000 (-0400) Subject: GFS2: Hash the negative dentry during inode lookup X-Git-Tag: v3.17-rc6~20^2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7b7a91152d3c2ddca95172cac1675625cc8dffaf;p=~emulex%2Finfiniband.git GFS2: Hash the negative dentry during inode lookup Fix a regression introduced by: 6d4ade986f9c8df31e68 GFS2: Add atomic_open support where an early return misses d_splice_alias() which had been adding the negative dentry. Signed-off-by: Benjamin Coddington Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse --- diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index e62e5947788..9317ddc1b3c 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -840,8 +840,10 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry, int error; inode = gfs2_lookupi(dir, &dentry->d_name, 0); - if (!inode) + if (inode == NULL) { + d_add(dentry, NULL); return NULL; + } if (IS_ERR(inode)) return ERR_CAST(inode);