Skip to content

Commit

Permalink
GFS2: Hash the negative dentry during inode lookup
Browse files Browse the repository at this point in the history
Fix a regression introduced by:
6d4ade9 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 <bcodding@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Benjamin Coddington authored and Steven Whitehouse committed Sep 11, 2014
1 parent 2ddfbdd commit 7b7a911
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7b7a911

Please sign in to comment.