📄 mount.h
字号:
/* * * Definitions for mount interface. This describes the in the kernel build * linkedlist with mounted filesystems. * * Author: Marco van Wieringen <mvw@planets.elm.net> * * Version: $Id: mount.h,v 2.0 1996/11/17 16:48:14 mvw Exp mvw $ * */#ifndef _LINUX_MOUNT_H#define _LINUX_MOUNT_H#ifdef __KERNEL__/*mnt_flags 标志*/#define MNT_NOSUID 1 /*禁止该文件系统的可执行文件设置setuid和setgid标志*/#define MNT_NODEV 2/*禁止访问该文件系统上的设备文件*/#define MNT_NOEXEC 4 /*禁止执行该文件系统上的可执行文件*/struct vfsmount{/*设备模块加载*/ struct list_head mnt_hash; /*哈希表*/ struct vfsmount *mnt_parent; /* fs we are mounted on 父文件系统*/ struct dentry *mnt_mountpoint; /* dentry of mountpoint 安装点的目录项对象*/ struct dentry *mnt_root; /* root of the mounted tree 该加载模块的根目录项对象*/ struct super_block *mnt_sb; /* pointer to superblock 加载模块的超级块*/ struct list_head mnt_mounts; /* list of children, anchored here 孩子加载模块挂接在这里*/ struct list_head mnt_child; /* and going through their mnt_child 孩子加载模块链表*/ atomic_t mnt_count;/*使用计数*/ int mnt_flags;/*安装标志*/ char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 设备文件名*/ struct list_head mnt_list;/*指向vfsmount结构所形成链表的头指针*/};static inline struct vfsmount *mntget(struct vfsmount *mnt){ if (mnt) atomic_inc(&mnt->mnt_count); return mnt;}extern void __mntput(struct vfsmount *mnt);static inline void mntput(struct vfsmount *mnt){ if (mnt) { if (atomic_dec_and_test(&mnt->mnt_count)) __mntput(mnt); }}#endif#endif /* _LINUX_MOUNT_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -