switch file_open_root() to struct path
[linux-block.git] / include / linux / fs.h
index ec8f3ddf4a6aa8b8fed88f4bc4b67dc20b3feca9..1acea2bb9d60a60c57504300234be2021718a430 100644 (file)
@@ -2632,8 +2632,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 *);