Re: [PATCH v3 1/2] fs: proc: store PDE()->data into inode->i_private

From: Christian Brauner
Date: Wed Nov 24 2021 - 08:36:48 EST


On Wed, Nov 24, 2021 at 04:19:55PM +0800, Muchun Song wrote:
> PDE_DATA(inode) is introduced to get user private data and hide the
> layout of struct proc_dir_entry. The inode->i_private is used to do
> the same thing as well. Save a copy of user private data to inode->
> i_private when proc inode is allocated. This means the user also can
> get their private data by inode->i_private.
>
> Introduce pde_data() to wrap inode->i_private so that we can remove
> PDE_DATA() from fs/proc/generic.c and make PTE_DATE() as a wrapper
> of pde_data(). It will be easier if we decide to remove PDE_DATE()
> in the future.
>
> Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
> ---

Seems like a good idea to me.
Acked-by: Christian Brauner <christian.brauner@xxxxxxxxxx>