aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2012-05-21 11:30:17 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:12:01 -0400
commit91daee988db38b0207eec719a3160b163c077007 (patch)
tree932e374dc322cb2ecd4d343c9c4a52b0d62467ff /fs/open.c
parent78f71eff3c274f3907f4aa1bbe3267281ba1c603 (diff)
vfs: nameidata_to_filp(): inline __dentry_open()
Copy __dentry_open() into nameidata_to_filp(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/fs/open.c b/fs/open.c
index 511c548b0997..9fd34b76b959 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -828,9 +828,25 @@ struct file *nameidata_to_filp(struct nameidata *nd)
828 828
829 /* Has the filesystem initialised the file for us? */ 829 /* Has the filesystem initialised the file for us? */
830 if (filp->f_path.dentry == NULL) { 830 if (filp->f_path.dentry == NULL) {
831 struct file *res;
832
831 path_get(&nd->path); 833 path_get(&nd->path);
832 filp = __dentry_open(nd->path.dentry, nd->path.mnt, filp, 834 res = do_dentry_open(nd->path.dentry, nd->path.mnt,
833 NULL, cred); 835 filp, NULL, cred);
836 if (!IS_ERR(res)) {
837 int error;
838
839 BUG_ON(res != filp);
840
841 error = open_check_o_direct(filp);
842 if (error) {
843 fput(filp);
844 filp = ERR_PTR(error);
845 }
846 } else {
847 put_filp(filp);
848 filp = res;
849 }
834 } 850 }
835 return filp; 851 return filp;
836} 852}