From 35cb6d54c1d5daf1d1ed585ef5ce4557e7ab284c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 13 Dec 2019 11:10:11 -0700 Subject: fs: make build_open_flags() available internally This is a prep patch for supporting non-blocking open from io_uring. Signed-off-by: Jens Axboe --- fs/internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/internal.h') diff --git a/fs/internal.h b/fs/internal.h index e3fa69544b66..c4baf42f8d8a 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -124,6 +124,8 @@ extern struct file *do_filp_open(int dfd, struct filename *pathname, const struct open_flags *op); extern struct file *do_file_open_root(struct dentry *, struct vfsmount *, const char *, const struct open_flags *); +extern struct open_how build_open_how(int flags, umode_t mode); +extern int build_open_flags(const struct open_how *how, struct open_flags *op); long do_sys_ftruncate(unsigned int fd, loff_t length, int small); long do_faccessat(int dfd, const char __user *filename, int mode); -- cgit v1.2.3 From 3934e36f6099e6277db33f433fe135c6644e8ac2 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 14 Dec 2019 13:26:33 -0700 Subject: fs: make two stat prep helpers available To implement an async stat, we need to provide the flags mapping and the statx user copy. Make them available internally, through fs/internal.h. Signed-off-by: Jens Axboe --- fs/internal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/internal.h') diff --git a/fs/internal.h b/fs/internal.h index c4baf42f8d8a..54e2835c0eba 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -190,3 +190,9 @@ extern int do_vfs_ioctl(struct file *file, unsigned int fd, unsigned int cmd, /* direct-io.c: */ int sb_init_dio_done_wq(struct super_block *sb); + +/* + * fs/stat.c: + */ +unsigned vfs_stat_set_lookup_flags(unsigned *lookup_flags, int flags); +int cp_statx(const struct kstat *stat, struct statx __user *buffer); -- cgit v1.2.3