fs: expose LOOKUP_CACHED through openat2() RESOLVE_CACHED
authorJens Axboe <axboe@kernel.dk>
Thu, 17 Dec 2020 16:19:10 +0000 (09:19 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Dec 2022 15:40:30 +0000 (08:40 -0700)
commitcb9294e007feacca1a5849773460dde71e50cdde
tree2e8e896da574a2f3c4c3c8a4d02c13bc385b6245
parent597ed7633bde8abc24c0cea5fbbfd824200d3251
fs: expose LOOKUP_CACHED through openat2() RESOLVE_CACHED

[ Upstream commit 99668f618062816ca7ba639b007eb145b9d3d41e ]

Now that we support non-blocking path resolution internally, expose it
via openat2() in the struct open_how ->resolve flags. This allows
applications using openat2() to limit path resolution to the extent that
it is already cached.

If the lookup cannot be satisfied in a non-blocking manner, openat2(2)
will return -1/-EAGAIN.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/open.c
include/linux/fcntl.h
include/uapi/linux/openat2.h