Commit 7b7a9115 authored by Benjamin Coddington's avatar Benjamin Coddington Committed by Steven Whitehouse

GFS2: Hash the negative dentry during inode lookup

Fix a regression introduced by:
6d4ade98 GFS2: Add atomic_open support
where an early return misses d_splice_alias() which had been
adding the negative dentry.
Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 2ddfbdd6
...@@ -840,8 +840,10 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry, ...@@ -840,8 +840,10 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
int error; int error;
inode = gfs2_lookupi(dir, &dentry->d_name, 0); inode = gfs2_lookupi(dir, &dentry->d_name, 0);
if (!inode) if (inode == NULL) {
d_add(dentry, NULL);
return NULL; return NULL;
}
if (IS_ERR(inode)) if (IS_ERR(inode))
return ERR_CAST(inode); return ERR_CAST(inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment