diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2014-09-10 14:09:20 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-09-11 05:54:43 -0400 |
commit | 7b7a91152d3c2ddca95172cac1675625cc8dffaf (patch) | |
tree | 5ae5d3c55024e073754699d2936f4f4402a1eef6 /fs | |
parent | 2ddfbdd6848d496d8088b28992d257fd02e58c9d (diff) |
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 <bcodding@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index e62e59477884..9317ddc1b3c3 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, | |||
840 | int error; | 840 | int error; |
841 | 841 | ||
842 | inode = gfs2_lookupi(dir, &dentry->d_name, 0); | 842 | inode = gfs2_lookupi(dir, &dentry->d_name, 0); |
843 | if (!inode) | 843 | if (inode == NULL) { |
844 | d_add(dentry, NULL); | ||
844 | return NULL; | 845 | return NULL; |
846 | } | ||
845 | if (IS_ERR(inode)) | 847 | if (IS_ERR(inode)) |
846 | return ERR_CAST(inode); | 848 | return ERR_CAST(inode); |
847 | 849 | ||