Merge branch 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / include / linux / fs.h
index 02bf57e6f6e2be8cd7e1438f5a6b8a45528e4819..bb40ac8608a7b13f240f7baf70e82e08dc853fe3 100644 (file)
@@ -2768,8 +2768,14 @@ extern long do_sys_open(int dfd, const char __user *filename, int flags,
                        umode_t mode);
 extern struct file *file_open_name(struct filename *, int, umode_t);
 extern struct file *filp_open(const char *, int, umode_t);
-extern struct file *file_open_root(struct dentry *, struct vfsmount *,
+extern struct file *file_open_root(const struct path *,
                                   const char *, int, umode_t);
+static inline struct file *file_open_root_mnt(struct vfsmount *mnt,
+                                  const char *name, int flags, umode_t mode)
+{
+       return file_open_root(&(struct path){.mnt = mnt, .dentry = mnt->mnt_root},
+                             name, flags, mode);
+}
 extern struct file * dentry_open(const struct path *, int, const struct cred *);
 extern struct file * open_with_fake_path(const struct path *, int,
                                         struct inode*, const struct cred *);