Re: [PATCH v3 09/14] vfs: add O_CREAT|O_DIRECTORY to open*(2)

From: Jori Koolstra

Date: Tue Jul 14 2026 - 06:52:43 EST



> Op 14-07-2026 07:10 CEST schreef Christoph Hellwig <hch@xxxxxxxxxxxxx>:
>
>
> On Tue, Jul 14, 2026 at 07:35:28AM +1000, NeilBrown wrote:
> > So let's add OPENAT2_NEW_COMBINATION which instructs openat2() to reject
> > unrecognised combinations. Old kernels will simply reject that.
> > New kernels can start using previously unsupported combinations safely.
>
> Yes. Also the name OPENAT2_NEW_COMBINATION feels a bit clunky :)
>
> > Maybe OPENAT2_NEW_COMBINATION could just reject *everything* at first,
> > then incrementally allow new combinations as they are defined.
>
> Yes, absolutely.

If we really want this we could add a flag to openat2(2) OPENAT2_FLAG_TEST
which just returns success if whatever other flags are passed in can be
combined or -EINVAL otherwise.

@Aleksa: if you are reading along, what do you think?