diff options
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 627f460a4007..8e109e586a74 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -240,6 +240,9 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, | |||
240 | err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); | 240 | err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); |
241 | if (err) | 241 | if (err) |
242 | return err; | 242 | return err; |
243 | err = check_nfsd_access(exp, rqstp); | ||
244 | if (err) | ||
245 | goto out; | ||
243 | /* | 246 | /* |
244 | * Note: we compose the file handle now, but as the | 247 | * Note: we compose the file handle now, but as the |
245 | * dentry may be negative, it may need to be updated. | 248 | * dentry may be negative, it may need to be updated. |
@@ -247,6 +250,7 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, | |||
247 | err = fh_compose(resfh, exp, dentry, fhp); | 250 | err = fh_compose(resfh, exp, dentry, fhp); |
248 | if (!err && !dentry->d_inode) | 251 | if (!err && !dentry->d_inode) |
249 | err = nfserr_noent; | 252 | err = nfserr_noent; |
253 | out: | ||
250 | dput(dentry); | 254 | dput(dentry); |
251 | exp_put(exp); | 255 | exp_put(exp); |
252 | return err; | 256 | return err; |