mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 06:41:39 +00:00
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:
parent
bf349a4470
commit
765927b2d5
15 changed files with 106 additions and 151 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue