diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-26 13:58:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-22 16:01:29 -0400 |
commit | 765927b2d508712d320c8934db963bbe14c3fcec (patch) | |
tree | 97acdb14fae285764def396c4ed01d4d5c93e76a /fs/xfs/xfs_ioctl.c | |
parent | bf349a447059656ebe63fb4fd1ccb27ac1da22ad (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/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 3a05a41b5d76..1f1535d25a9b 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c | |||
@@ -208,6 +208,7 @@ xfs_open_by_handle( | |||
208 | struct inode *inode; | 208 | struct inode *inode; |
209 | struct dentry *dentry; | 209 | struct dentry *dentry; |
210 | fmode_t fmode; | 210 | fmode_t fmode; |
211 | struct path path; | ||
211 | 212 | ||
212 | if (!capable(CAP_SYS_ADMIN)) | 213 | if (!capable(CAP_SYS_ADMIN)) |
213 | return -XFS_ERROR(EPERM); | 214 | return -XFS_ERROR(EPERM); |
@@ -252,8 +253,10 @@ xfs_open_by_handle( | |||
252 | goto out_dput; | 253 | goto out_dput; |
253 | } | 254 | } |
254 | 255 | ||
255 | filp = dentry_open(dentry, mntget(parfilp->f_path.mnt), | 256 | path.mnt = parfilp->f_path.mnt; |
256 | hreq->oflags, cred); | 257 | path.dentry = dentry; |
258 | filp = dentry_open(&path, hreq->oflags, cred); | ||
259 | dput(dentry); | ||
257 | if (IS_ERR(filp)) { | 260 | if (IS_ERR(filp)) { |
258 | put_unused_fd(fd); | 261 | put_unused_fd(fd); |
259 | return PTR_ERR(filp); | 262 | return PTR_ERR(filp); |