aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/open.c b/fs/open.c
index d05e18c60bae..48afc5c139d2 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -959,6 +959,20 @@ struct file *filp_open(const char *filename, int flags, int mode)
959} 959}
960EXPORT_SYMBOL(filp_open); 960EXPORT_SYMBOL(filp_open);
961 961
962struct file *file_open_root(struct dentry *dentry, struct vfsmount *mnt,
963 const char *filename, int flags)
964{
965 struct open_flags op;
966 int lookup = build_open_flags(flags, 0, &op);
967 if (flags & O_CREAT)
968 return ERR_PTR(-EINVAL);
969 if (!filename && (flags & O_DIRECTORY))
970 if (!dentry->d_inode->i_op->lookup)
971 return ERR_PTR(-ENOTDIR);
972 return do_file_open_root(dentry, mnt, filename, &op, lookup);
973}
974EXPORT_SYMBOL(file_open_root);
975
962long do_sys_open(int dfd, const char __user *filename, int flags, int mode) 976long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
963{ 977{
964 struct open_flags op; 978 struct open_flags op;