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: NLinus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/io-uring/20210415100815.edrn4a7cy26wkowe@wittgenstein/Signed-off-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NDmitry Kadashev <dkadashev@gmail.com> Acked-by: NChristian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/r/20210708063447.3556403-7-dkadashev@gmail.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
Showing
想要评论请 注册 或 登录