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:
@@ -208,6 +208,7 @@ xfs_open_by_handle(
|
||||
struct inode *inode;
|
||||
struct dentry *dentry;
|
||||
fmode_t fmode;
|
||||
struct path path;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -XFS_ERROR(EPERM);
|
||||
@@ -252,8 +253,10 @@ xfs_open_by_handle(
|
||||
goto out_dput;
|
||||
}
|
||||
|
||||
filp = dentry_open(dentry, mntget(parfilp->f_path.mnt),
|
||||
hreq->oflags, cred);
|
||||
path.mnt = parfilp->f_path.mnt;
|
||||
path.dentry = dentry;
|
||||
filp = dentry_open(&path, hreq->oflags, cred);
|
||||
dput(dentry);
|
||||
if (IS_ERR(filp)) {
|
||||
put_unused_fd(fd);
|
||||
return PTR_ERR(filp);
|
||||
|
Reference in New Issue
Block a user