diff options
author | Dmitry Kadashev <dkadashev@gmail.com> | 2021-07-08 13:34:42 +0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-23 13:41:26 -0600 |
commit | 8228e2c313194f13f1d1806ed5734a26c38d49ac (patch) | |
tree | 84d58d03dbd06a8258bed089f2f435cff4c63f38 /include/linux/fs.h | |
parent | da2d0cede330192879e8e16ddb3158aa76ba5ec2 (diff) | |
download | linux-stable-8228e2c313194f13f1d1806ed5734a26c38d49ac.tar.gz linux-stable-8228e2c313194f13f1d1806ed5734a26c38d49ac.tar.bz2 linux-stable-8228e2c313194f13f1d1806ed5734a26c38d49ac.zip |
namei: add getname_uflags()
There are a couple of places where we already open-code the (flags &
AT_EMPTY_PATH) check and io_uring will likely add another one in the
future. Let's just add a simple helper getname_uflags() that handles
this directly and use it.
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/io-uring/20210415100815.edrn4a7cy26wkowe@wittgenstein/
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Dmitry Kadashev <dkadashev@gmail.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20210708063447.3556403-7-dkadashev@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 640574294216..26d41a445e81 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2786,6 +2786,7 @@ static inline struct file *file_clone_open(struct file *file) extern int filp_close(struct file *, fl_owner_t id); extern struct filename *getname_flags(const char __user *, int, int *); +extern struct filename *getname_uflags(const char __user *, int); extern struct filename *getname(const char __user *); extern struct filename *getname_kernel(const char *); extern void putname(struct filename *name); |