From: Matthew Wilcox <willy@infradead.org>
To: Christian Brauner <brauner@kernel.org>
Cc: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"david@fromorbit.com" <david@fromorbit.com>,
"djwong@kernel.org" <djwong@kernel.org>,
"jlayton@kernel.org" <jlayton@kernel.org>
Subject: Re: [PATCH v6 1/4] fs: move sgid strip operation from inode_init_owner into inode_sgid_strip
Date: Mon, 25 Apr 2022 18:33:55 +0100 [thread overview]
Message-ID: <Ymbbg3XbN17l3Jir@casper.infradead.org> (raw)
In-Reply-To: <20220425112947.higk7uawxkcdcjgj@wittgenstein>
On Mon, Apr 25, 2022 at 01:29:47PM +0200, Christian Brauner wrote:
> On Mon, Apr 25, 2022 at 03:08:36AM +0000, xuyang2018.jy@fujitsu.com wrote:
> > on 2022/4/25 10:45, Matthew Wilcox wrote:
> > > On Mon, Apr 25, 2022 at 11:09:38AM +0800, Yang Xu wrote:
> > >> This has no functional change. Just create and export inode_sgid_strip
> > >> api for the subsequent patch. This function is used to strip inode's
> > >> S_ISGID mode when init a new inode.
> > >
> > > Why would you call this inode_sgid_strip() instead of
> > > inode_strip_sgid()?
> >
> > Because I treated "inode sgid(inode's sgid)" as a whole.
> >
> > inode_strip_sgid sounds also ok, but now seems strip_inode_sgid seem
> > more clear because we strip inode sgid depend on not only inode's
> > condition but also depend on parent directory's condition.
> >
> > What do you think about this?
> >
> > ps: I can aceept the above several way, so if you insist, I can change
> > it to inode_strip_sgid.
>
> I agree with Willy. I think inode_strip_sgid() is better. It'll be in
> good company as <object>_<verb>_<what?> is pretty common:
>
> inode_update_atime()
> inode_init_once()
> inode_init_owner()
> inode_init_early()
> inode_add_lru()
> inode_needs_sync()
> inode_set_flags()
>
> Maybe mode_remove_sgid() is even better because it makes it clear that
> the change happens to @mode and not @dir. But I'm fine with
> inode_strip_sgid() or inode_remove_sgid() too.
Oh! Yes, mode_strip_sgid() is better. We're operating on the mode,
not the inode.
next prev parent reply other threads:[~2022-04-25 17:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 3:09 [PATCH v6 1/4] fs: move sgid strip operation from inode_init_owner into inode_sgid_strip Yang Xu
2022-04-25 2:45 ` Matthew Wilcox
2022-04-25 3:08 ` xuyang2018.jy
2022-04-25 11:29 ` Christian Brauner
2022-04-25 17:33 ` Matthew Wilcox [this message]
2022-04-26 1:22 ` xuyang2018.jy
2022-04-25 3:09 ` [PATCH v6 2/4] fs: Add missing umask strip in vfs_tmpfile Yang Xu
2022-04-25 16:54 ` Darrick J. Wong
2022-04-25 3:09 ` [PATCH v6 3/4] fs: strip file's S_ISGID mode on vfs instead of on underlying filesystem Yang Xu
2022-04-25 16:51 ` Darrick J. Wong
2022-04-26 1:25 ` xuyang2018.jy
2022-04-25 3:09 ` [PATCH v6 4/4] ceph: Remove S_ISGID stripping code in ceph_finish_async_create Yang Xu
2022-04-25 16:53 ` [PATCH v6 1/4] fs: move sgid strip operation from inode_init_owner into inode_sgid_strip Darrick J. Wong
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=Ymbbg3XbN17l3Jir@casper.infradead.org \
--to=willy@infradead.org \
--cc=brauner@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=xuyang2018.jy@fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).