From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Muchun Song <songmuchun@bytedance.com>,
adobriyan@gmail.com, gladkov.alexey@gmail.com,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2] fs: proc: store PDE()->data into inode->i_private
Date: Fri, 19 Nov 2021 14:56:43 -0800 [thread overview]
Message-ID: <20211119145643.21bbd5ee8e2830dd72d983e3@linux-foundation.org> (raw)
In-Reply-To: <YZdQ+0D7n5xCnw5A@infradead.org>
On Thu, 18 Nov 2021 23:23:39 -0800 Christoph Hellwig <hch@infradead.org> wrote:
> On Fri, Nov 19, 2021 at 12:11:04PM +0800, Muchun Song wrote:
> > +
> > +/*
> > + * Obtain the private data passed by user through proc_create_data() or
> > + * related.
> > + */
> > +static inline void *pde_data(const struct inode *inode)
> > +{
> > + return inode->i_private;
> > +}
> > +
> > +#define PDE_DATA(i) pde_data(i)
>
> What is the point of pde_data?
It's a regular old C function, hence should be in lower case.
I assume the upper case thing is a holdover from when it was
implemented as a macro.
> If we really think changing to lower
> case is worth it (I don't think so, using upper case for getting at
> private data is a common idiom in file systems),
It is? How odd.
I find the upper-case thing to be actively misleading. It's mildly
surprising to discover that it's actually a plain old C function.
> we can just do that
> scripted in one go.
Yes, I'd like to see a followup patch which converts the current
PDE_DATA() callsites.
next prev parent reply other threads:[~2021-11-19 22:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 4:11 [PATCH v2] fs: proc: store PDE()->data into inode->i_private Muchun Song
2021-11-19 7:23 ` Christoph Hellwig
2021-11-19 22:56 ` Andrew Morton [this message]
2021-11-22 4:13 ` Muchun Song
2021-11-24 3:10 ` Andrew Morton
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=20211119145643.21bbd5ee8e2830dd72d983e3@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=gladkov.alexey@gmail.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=songmuchun@bytedance.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).