- 论坛徽章:
- 5
|
本帖最后由 T-Bagwell 于 2011-07-28 12:25 编辑
include/linux/fs.h
可以看到
- struct inode {
- /* RCU path lookup touches following: */
- umode_t i_mode;
- uid_t i_uid;
- gid_t i_gid;
- const struct inode_operations *i_op;
- struct super_block *i_sb;
- spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
- unsigned int i_flags;
- unsigned long i_state;
- #ifdef CONFIG_SECURITY
- void *i_security;
- #endif
- struct mutex i_mutex;
- unsigned long dirtied_when; /* jiffies of first dirtying */
- struct hlist_node i_hash;
- struct list_head i_wb_list; /* backing dev IO list */
- struct list_head i_lru; /* inode LRU list */
- struct list_head i_sb_list;
- union {
- struct list_head i_dentry;
- struct rcu_head i_rcu;
- };
- unsigned long i_ino;
- atomic_t i_count;
- unsigned int i_nlink;
- dev_t i_rdev;
- unsigned int i_blkbits;
- u64 i_version;
- loff_t i_size;
- #ifdef __NEED_I_SIZE_ORDERED
- seqcount_t i_size_seqcount;
- seqcount_t i_size_seqcount;
- #endif
- struct timespec i_atime;
- struct timespec i_mtime;
- struct timespec i_ctime;
- blkcnt_t i_blocks;
- unsigned short i_bytes;
- atomic_t i_dio_count;
- const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
- struct file_lock *i_flock;
- struct address_space *i_mapping;
- struct address_space i_data;
- #ifdef CONFIG_QUOTA
- struct dquot *i_dquot[MAXQUOTAS];
- #endif
- struct list_head i_devices;
- union {
- struct pipe_inode_info *i_pipe;
- struct block_device *i_bdev;
- struct cdev *i_cdev;
- };
- __u32 i_generation;
- #ifdef CONFIG_FSNOTIFY
- __u32 i_fsnotify_mask; /* all events this inode cares about */
- struct hlist_head i_fsnotify_marks;
- #endif
- #ifdef CONFIG_IMA
- atomic_t i_readcount; /* struct files open RO */
- #endif
- atomic_t i_writecount;
- #ifdef CONFIG_FS_POSIX_ACL
- struct posix_acl *i_acl;
- struct posix_acl *i_acl;
- struct posix_acl *i_default_acl;
- #endif
- void *i_private; /* fs or device private pointer */
- };
- 其中list head的定义
- struct list_head {
- struct list_head *next, *prev;
- };
复制代码 肯定要挂到链表上的,该节点的地址,就是通过typeof获得结构的地址的
地址都有了,就随便你怎么玩了
至于你说的属主
一般就是inode->i_uid吧? |
评分
-
查看全部评分
|