diff options
| author | Muchun Song <[email protected]> | 2022-01-22 06:14:20 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2022-01-22 06:33:37 +0000 |
| commit | 6dfbbae14a7b961f41d80a106e1ab60e86d061c5 (patch) | |
| tree | 487d7ecefb4ad5b67b697fd7f99567a795c23455 /fs/proc/generic.c | |
| parent | zsmalloc: replace get_cpu_var with local_lock (diff) | |
| download | kernel-6dfbbae14a7b961f41d80a106e1ab60e86d061c5.tar.gz kernel-6dfbbae14a7b961f41d80a106e1ab60e86d061c5.zip | |
fs: proc: store PDE()->data into inode->i_private
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.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Muchun Song <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Alexey Gladkov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/generic.c')
| -rw-r--r-- | fs/proc/generic.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 5b78739e60e4..f2132407e133 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -791,12 +791,6 @@ void proc_remove(struct proc_dir_entry *de) } EXPORT_SYMBOL(proc_remove); -void *PDE_DATA(const struct inode *inode) -{ - return __PDE_DATA(inode); -} -EXPORT_SYMBOL(PDE_DATA); - /* * Pull a user buffer into memory and pass it to the file's write handler if * one is supplied. The ->write() method is permitted to modify the |
