aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hppfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-26 13:58:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-22 16:01:29 -0400
commit765927b2d508712d320c8934db963bbe14c3fcec (patch)
tree97acdb14fae285764def396c4ed01d4d5c93e76a /fs/hppfs
parentbf349a447059656ebe63fb4fd1ccb27ac1da22ad (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/hppfs')
-rw-r--r--fs/hppfs/hppfs.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c
index e5c06531dcc4..c1dffe47fde2 100644
--- a/fs/hppfs/hppfs.c
+++ b/fs/hppfs/hppfs.c
@@ -420,8 +420,7 @@ static int hppfs_open(struct inode *inode, struct file *file)
420{ 420{
421 const struct cred *cred = file->f_cred; 421 const struct cred *cred = file->f_cred;
422 struct hppfs_private *data; 422 struct hppfs_private *data;
423 struct vfsmount *proc_mnt; 423 struct path path;
424 struct dentry *proc_dentry;
425 char *host_file; 424 char *host_file;
426 int err, fd, type, filter; 425 int err, fd, type, filter;
427 426
@@ -434,12 +433,11 @@ static int hppfs_open(struct inode *inode, struct file *file)
434 if (host_file == NULL) 433 if (host_file == NULL)
435 goto out_free2; 434 goto out_free2;
436 435
437 proc_dentry = HPPFS_I(inode)->proc_dentry; 436 path.mnt = inode->i_sb->s_fs_info;
438 proc_mnt = inode->i_sb->s_fs_info; 437 path.dentry = HPPFS_I(inode)->proc_dentry;
439 438
440 /* XXX This isn't closed anywhere */ 439 /* XXX This isn't closed anywhere */
441 data->proc_file = dentry_open(dget(proc_dentry), mntget(proc_mnt), 440 data->proc_file = dentry_open(&path, file_mode(file->f_mode), cred);
442 file_mode(file->f_mode), cred);
443 err = PTR_ERR(data->proc_file); 441 err = PTR_ERR(data->proc_file);
444 if (IS_ERR(data->proc_file)) 442 if (IS_ERR(data->proc_file))
445 goto out_free1; 443 goto out_free1;
@@ -484,8 +482,7 @@ static int hppfs_dir_open(struct inode *inode, struct file *file)
484{ 482{
485 const struct cred *cred = file->f_cred; 483 const struct cred *cred = file->f_cred;
486 struct hppfs_private *data; 484 struct hppfs_private *data;
487 struct vfsmount *proc_mnt; 485 struct path path;
488 struct dentry *proc_dentry;
489 int err; 486 int err;
490 487
491 err = -ENOMEM; 488 err = -ENOMEM;
@@ -493,10 +490,9 @@ static int hppfs_dir_open(struct inode *inode, struct file *file)
493 if (data == NULL) 490 if (data == NULL)
494 goto out; 491 goto out;
495 492
496 proc_dentry = HPPFS_I(inode)->proc_dentry; 493 path.mnt = inode->i_sb->s_fs_info;
497 proc_mnt = inode->i_sb->s_fs_info; 494 path.dentry = HPPFS_I(inode)->proc_dentry;
498 data->proc_file = dentry_open(dget(proc_dentry), mntget(proc_mnt), 495 data->proc_file = dentry_open(&path, file_mode(file->f_mode), cred);
499 file_mode(file->f_mode), cred);
500 err = PTR_ERR(data->proc_file); 496 err = PTR_ERR(data->proc_file);
501 if (IS_ERR(data->proc_file)) 497 if (IS_ERR(data->proc_file))
502 goto out_free; 498 goto out_free;