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:
Al Viro 2012-06-26 21:58:53 +04:00
parent bf349a4470
commit 765927b2d5
15 changed files with 106 additions and 151 deletions

View file

@ -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);