diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-04-09 17:28:53 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-04-11 14:42:22 +0200 |
commit | 29a78a3ed7fc9c4ee49962751eb321b038c190a2 (patch) | |
tree | 88798f9c1a4247fa7de6bb7f698cbd47213895ac /fs/nfsd/vfs.c | |
parent | nfsd4: introduce OPDESC helper (diff) | |
download | linux-29a78a3ed7fc9c4ee49962751eb321b038c190a2.tar.xz linux-29a78a3ed7fc9c4ee49962751eb321b038c190a2.zip |
nfsd4: make fh_verify responsibility of nfsd_lookup_dentry caller
The secinfo caller actually won't want this.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index a76ef7e0b3d0..e53313972c30 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -181,16 +181,10 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp, struct svc_export *exp; struct dentry *dparent; struct dentry *dentry; - __be32 err; int host_err; dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name); - /* Obtain dentry and export. */ - err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); - if (err) - return err; - dparent = fhp->fh_dentry; exp = fhp->fh_export; exp_get(exp); @@ -254,6 +248,9 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, struct dentry *dentry; __be32 err; + err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); + if (err) + return err; err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); if (err) return err; |