[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMZfGtV7pNaVNtzPCmXnGgeojPzyVxXSeawnp5znJxkjFweAgA@mail.gmail.com>
Date: Mon, 22 Nov 2021 12:13:33 +0800
From: Muchun Song <songmuchun@...edance.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Christoph Hellwig <hch@...radead.org>,
Alexey Dobriyan <adobriyan@...il.com>,
gladkov.alexey@...il.com, LKML <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH v2] fs: proc: store PDE()->data into inode->i_private
On Sat, Nov 20, 2021 at 6:56 AM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Thu, 18 Nov 2021 23:23:39 -0800 Christoph Hellwig <hch@...radead.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.
>
You mean replace all PDE_DATA with pde_data in another patch?
Thanks.
Powered by blists - more mailing lists