lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/2] fs: proc: store PDE()->data into inode->i_private
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@bytedance.com>
> ---

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

\
 
 \ /
  Last update: 2021-11-24 14:39    [W:0.047 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site