switch dentry_open() to struct path, make it grab references itself
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -745,7 +745,7 @@ __be32
|
||||
nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
|
||||
int may_flags, struct file **filp)
|
||||
{
|
||||
struct dentry *dentry;
|
||||
struct path path;
|
||||
struct inode *inode;
|
||||
int flags = O_RDONLY|O_LARGEFILE;
|
||||
__be32 err;
|
||||
@@ -762,8 +762,9 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
dentry = fhp->fh_dentry;
|
||||
inode = dentry->d_inode;
|
||||
path.mnt = fhp->fh_export->ex_path.mnt;
|
||||
path.dentry = fhp->fh_dentry;
|
||||
inode = path.dentry->d_inode;
|
||||
|
||||
/* Disallow write access to files with the append-only bit set
|
||||
* or any access when mandatory locking enabled
|
||||
@@ -792,8 +793,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
|
||||
else
|
||||
flags = O_WRONLY|O_LARGEFILE;
|
||||
}
|
||||
*filp = dentry_open(dget(dentry), mntget(fhp->fh_export->ex_path.mnt),
|
||||
flags, current_cred());
|
||||
*filp = dentry_open(&path, flags, current_cred());
|
||||
if (IS_ERR(*filp))
|
||||
host_err = PTR_ERR(*filp);
|
||||
else {
|
||||
|
Reference in New Issue
Block a user