From: Andrew Morton <akpm@linux-foundation.org>
To: Muchun Song <songmuchun@bytedance.com>
Cc: adobriyan@gmail.com, gladkov.alexey@gmail.com,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 0/4] remove PDE_DATA()
Date: Mon, 15 Nov 2021 21:09:17 -0800 [thread overview]
Message-ID: <20211115210917.96f681f0a75dfe6e1772dc6d@linux-foundation.org> (raw)
In-Reply-To: <20211101093518.86845-1-songmuchun@bytedance.com>
On Mon, 1 Nov 2021 17:35:14 +0800 Muchun Song <songmuchun@bytedance.com> wrote:
> I found a bug [1] some days ago, which is because we want to use
> inode->i_private to pass user private data. However, this is wrong
> on proc fs. We provide a specific function PDE_DATA() to get user
> private data. Actually, we can hide this detail by storing
> PDE()->data into inode->i_private and removing PDE_DATA() completely.
> The user could use inode->i_private to get user private data just
> like debugfs does. This series is trying to remove PDE_DATA().
Why can't we do
/*
* comment goes here
*/
static inline void *PDE_DATA(struct inode *inode)
{
return inode->i_private;
}
to abstract things a bit and to reduce the patch size?
otoh, that upper-case thing needs to go, so the patch size remains the
same anyway.
And perhaps we should have a short-term
#define PDE_DATA(i) pde_data(i)
because new instances are sure to turn up during the development cycle.
But I can handle that by staging the patch series after linux-next and
reminding myself to grep for new PDE_DATA instances prior to
upstreaming.
next prev parent reply other threads:[~2021-11-16 5:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 9:35 [PATCH 0/4] remove PDE_DATA() Muchun Song
2021-11-01 9:35 ` [PATCH 1/4] fs: proc: store PDE()->data into inode->i_private Muchun Song
2021-11-01 9:35 ` [PATCH 2/4] fs: proc: replace PDE_DATA(inode) with inode->i_private Muchun Song
2021-11-01 9:35 ` [PATCH 3/4] fs: proc: remove PDE_DATA() Muchun Song
2021-11-01 9:35 ` [PATCH 4/4] fs: proc: use DEFINE_PROC_SHOW_ATTRIBUTE() to simplify the code Muchun Song
2021-11-16 5:09 ` Andrew Morton [this message]
2021-11-16 8:26 ` [PATCH 0/4] remove PDE_DATA() Muchun Song
2021-11-16 20:01 ` Andrew Morton
2021-11-17 8:24 ` Muchun Song
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=20211115210917.96f681f0a75dfe6e1772dc6d@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=gladkov.alexey@gmail.com \
--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).