proc: Make the PROC_I() and PDE() macros internal to procfs
Make the PROC_I() and PDE() macros internal to procfs. This means making PDE_DATA() out of line. This could be made more optimal by storing PDE()->data into inode->i_private. Also provide a __PDE_DATA() that is inline and internal to procfs. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -84,6 +84,24 @@ struct proc_maps_private {
|
||||
|
||||
void proc_init_inodecache(void);
|
||||
|
||||
/*
|
||||
* General functions
|
||||
*/
|
||||
static inline struct proc_inode *PROC_I(const struct inode *inode)
|
||||
{
|
||||
return container_of(inode, struct proc_inode, vfs_inode);
|
||||
}
|
||||
|
||||
static inline struct proc_dir_entry *PDE(const struct inode *inode)
|
||||
{
|
||||
return PROC_I(inode)->pde;
|
||||
}
|
||||
|
||||
static inline void *__PDE_DATA(const struct inode *inode)
|
||||
{
|
||||
return PDE(inode)->data;
|
||||
}
|
||||
|
||||
static inline struct pid *proc_pid(struct inode *inode)
|
||||
{
|
||||
return PROC_I(inode)->pid;
|
||||
|
Reference in New Issue
Block a user