Re: [PATCH] do_open(): Fix O_DIRECTORY | O_CREAT behavior

From: Linus Torvalds
Date: Mon Mar 20 2023 - 13:20:31 EST


On Mon, Mar 20, 2023 at 4:52 AM Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> So before we continue down that road should we maybe treat this as a
> chance to fix the old bug? Because this behavior of returning -ENOTDIR
> has existed ever since v5.7 now. Since that time we had three LTS
> releases all returning ENOTDIR even if the file was created.

Ack.

I think considering that the return value has been broken for so long,
I think we can pretty much assume that there are no actual users of
it, and we might as well clean up the semantics properly.

Willing to send that patch in and we'll get it tested in the crucible
of the real world?

Linus