This is the actual data not a pointer to an instance of the structure

This is exactly the same data used by the VFS layer for inode management. In other words, directly before each instance of an inode structure linked with the proc filesystem, there are additional data in memory that can be extracted from a given instance of proc_inode using the container mechanism. Because the kernel frequently needs to access this information, it defines the following auxiliary procedure:

static inline struct proc_inode *PROC_I(const struct inode *inode) {

return container_of(inode, struct proc_inode, vfs_inode);

This returns the inode-specific data associated with a VFS inode. Figure 10-1 illustrates the situation in memory.

proc_inode

VFS-Inode

A

-PROC I

Continue reading here: Figure 101 Connection between struct procinode and struct inode

Was this article helpful?

0 0