mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
GFS2: Hash the negative dentry during inode lookup
Fix a regression introduced by:
6d4ade986f
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>
This commit is contained in:
parent
2ddfbdd684
commit
7b7a91152d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user