diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 4133ef5264e5..27b5a1051b1c 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -935,8 +935,11 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru | |||
935 | 935 | ||
936 | no_entry: | 936 | no_entry: |
937 | res = d_materialise_unique(dentry, inode); | 937 | res = d_materialise_unique(dentry, inode); |
938 | if (res != NULL) | 938 | if (res != NULL) { |
939 | if (IS_ERR(res)) | ||
940 | goto out_unlock; | ||
939 | dentry = res; | 941 | dentry = res; |
942 | } | ||
940 | nfs_renew_times(dentry); | 943 | nfs_renew_times(dentry); |
941 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 944 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
942 | out_unlock: | 945 | out_unlock: |
@@ -1132,6 +1135,8 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc) | |||
1132 | alias = d_materialise_unique(dentry, inode); | 1135 | alias = d_materialise_unique(dentry, inode); |
1133 | if (alias != NULL) { | 1136 | if (alias != NULL) { |
1134 | dput(dentry); | 1137 | dput(dentry); |
1138 | if (IS_ERR(alias)) | ||
1139 | return NULL; | ||
1135 | dentry = alias; | 1140 | dentry = alias; |
1136 | } | 1141 | } |
1137 | 1142 | ||