Thread (4 messages) 4 messages, 2 authors, 2021-11-24

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

From: Christian Brauner <hidden>
Date: 2021-11-24 13:36:22
Also in: lkml

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 <redacted>
---
Seems like a good idea to me.
Acked-by: Christian Brauner <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help