From: Al Viro <viro@zeniv.linux.org.uk>
To: Arthur Williams <taaparthur@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs: Allow open with O_CREAT to succeed if existing dir is specified
Date: Sat, 19 Jun 2021 15:09:16 +0000 [thread overview]
Message-ID: <YM4InFG2HnrbHdsO@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <CAJ6D+Z96OWwZMzickLP3PtUnsJhSfZqTnLrmk4-t5iNUid=N=Q@mail.gmail.com>
On Sat, Jun 19, 2021 at 06:44:52AM -0700, Arthur Williams wrote:
> util-linux explicitly
> acknowledges it. From their sys-utils/flock.c: "Linux doesn't like O_CREAT
> on a directory, even
> though it should be a no-op;"
So does *BSD, while we are at it. Out of curiosity - which more or less
recent Unices do *not* behave that way?
> And to their point, the man page for open
> does seem to imply that:
> O_CREAT
> If pathname does not exist, create it as a regular file.
>
> But I can also see how it isn't completely clear since it doesn't
> explicitly state what happens when
> the file already exists. If this patch is to be rejected, would it be best
> to
> update the man pages/docs to explain the effect and justification for the
> current behavior?
*shrug*
Quote POSIX in errors section, perhaps?
next prev parent reply other threads:[~2021-06-19 15:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-19 11:01 [PATCH] fs: Allow open with O_CREAT to succeed if existing dir is specified Arthur Williams
2021-06-19 12:42 ` Al Viro
2021-06-19 14:27 ` Matthew Wilcox
[not found] ` <CAJ6D+Z96OWwZMzickLP3PtUnsJhSfZqTnLrmk4-t5iNUid=N=Q@mail.gmail.com>
2021-06-19 15:09 ` Al Viro [this message]
2021-07-01 2:19 ` [fs] 87f196bed3: xfstests.generic.157.fail kernel test robot
2021-07-01 2:19 ` kernel test robot
2021-07-01 9:48 ` David Sterba
2021-07-01 9:48 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YM4InFG2HnrbHdsO@zeniv-ca.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=taaparthur@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.