Re: [RFC PATCH v2 1/2] vfs: syscalls: add mkdirat2() that returns an O_DIRECTORY fd

Jeff Layton
2026-04-28T06:39:44Z

On Mon, 2026-04-27 at 17:48 +0200, Christian Brauner wrote:
>
>
> And side-question: @Jeff, can nfs atomic open deal with O_CREAT |
> O_DIRECTORY?
>

No, it can't. OPEN calls only work on regular files. This is why
O_DIRECTORY works on NFS. If we end up issuing an OPEN against a
directory, it'll fail, which is what we want in that situation.
--
Jeff Layton <jlayton@kernel.org>