From: Jori Koolstra <jkoolstra@xs4all.nl>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Steve French <sfrench@samba.org>,
Steve French <smfrench@gmail.com>, NeilBrown <neil@brown.name>,
Jeff Layton <jlayton@kernel.org>,
linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/1] vfs: pass S_IFDIR mode to vfs_prepare_mode()
Date: Thu, 11 Jun 2026 22:16:43 +0200 (CEST) [thread overview]
Message-ID: <794378689.1433974.1781209003271@kpc.webmail.kpnmail.nl> (raw)
In-Reply-To: <20260611163736.GM2636677@ZenIV>
> Op 11-06-2026 18:37 CEST schreef Al Viro <viro@zeniv.linux.org.uk>:
>
> There's a missing bit here: what's the point?
To clean up a bit ahead of O_CREAT|O_DIRECTORY. Specifically, in lookup_open()
we need to replace the vfs_prepare_mode() with something that also handles dirs.
I don't really want to push the odd
mode = vfs_prepare_mode(idmap, dir, mode, S_IRWXUGO | S_ISVTX, 0);
further into that code, and neither do I want this to be different from the
regular vfs_mkdir() path. We can then also match on S_IFMT in may_o_create(),
instead of passing a bool to signal whether we are creating a dir (and assuming
0 means a dir is really ugly).
This was discussed a bit in an rfc patch for O_CREAT|O_DIRECTORY, and Christian
said when he wrote that comment he "might've been overly cautious"[1]
I should have added this explanation to the commit message, you are right about
that. Thanks for pointing that out.
Best,
Jori.
[1]: https://lore.kernel.org/linux-fsdevel/20260527-fotowettbewerb-abwinken-einfach-83db3411945b@brauner/
next prev parent reply other threads:[~2026-06-11 20:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 14:57 Jori Koolstra
2026-06-11 14:57 ` [RFC PATCH 1/1] " Jori Koolstra
2026-06-11 15:33 ` [RFC PATCH 0/1] " Jan Kara
2026-06-11 20:20 ` Jori Koolstra
2026-06-12 10:33 ` Jan Kara
2026-06-12 12:19 ` Christian Brauner
2026-06-11 16:37 ` Al Viro
2026-06-11 20:16 ` Jori Koolstra [this message]
2026-06-13 1:44 ` NeilBrown
2026-06-14 16:57 ` Jori Koolstra
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=794378689.1433974.1781209003271@kpc.webmail.kpnmail.nl \
--to=jkoolstra@xs4all.nl \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil@brown.name \
--cc=sfrench@samba.org \
--cc=smfrench@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®