aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-26 13:58:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-22 16:01:29 -0400
commit765927b2d508712d320c8934db963bbe14c3fcec (patch)
tree97acdb14fae285764def396c4ed01d4d5c93e76a /fs/nfsd
parentbf349a447059656ebe63fb4fd1ccb27ac1da22ad (diff)
switch dentry_open() to struct path, make it grab references itself
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/vfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 05d9eee6be3a..4700a0a929d7 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -745,7 +745,7 @@ __be32
745nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, 745nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
746 int may_flags, struct file **filp) 746 int may_flags, struct file **filp)
747{ 747{
748 struct dentry *dentry; 748 struct path path;
749 struct inode *inode; 749 struct inode *inode;
750 int flags = O_RDONLY|O_LARGEFILE; 750 int flags = O_RDONLY|O_LARGEFILE;
751 __be32 err; 751 __be32 err;
@@ -762,8 +762,9 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
762 if (err) 762 if (err)
763 goto out; 763 goto out;
764 764
765 dentry = fhp->fh_dentry; 765 path.mnt = fhp->fh_export->ex_path.mnt;
766 inode = dentry->d_inode; 766 path.dentry = fhp->fh_dentry;
767 inode = path.dentry->d_inode;
767 768
768 /* Disallow write access to files with the append-only bit set 769 /* Disallow write access to files with the append-only bit set
769 * or any access when mandatory locking enabled 770 * or any access when mandatory locking enabled
@@ -792,8 +793,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
792 else 793 else
793 flags = O_WRONLY|O_LARGEFILE; 794 flags = O_WRONLY|O_LARGEFILE;
794 } 795 }
795 *filp = dentry_open(dget(dentry), mntget(fhp->fh_export->ex_path.mnt), 796 *filp = dentry_open(&path, flags, current_cred());
796 flags, current_cred());
797 if (IS_ERR(*filp)) 797 if (IS_ERR(*filp))
798 host_err = PTR_ERR(*filp); 798 host_err = PTR_ERR(*filp);
799 else { 799 else {