creates a new file instance by hooking it up to an anonymous inode,
and a dentry that describe the "class" of the file
通过将 "新文件实例"(file结构体) 连接到 "匿名inode" 和 "描述文件“类”的dentry" 来 创建新文件实例
Creates a new file by hooking it on a single inode.
This is useful for files that do not need to have a full-fledged inode in order to operate correctly.
通过将新文件挂接到"单个索引节点"(anon_inode_inode)来创建新文件。
这对于不需要 "完整inode" 才能正确运行的文件非常有用。
All the files created with anon_inode_getxxx() will share a single inode,
hence saving memory and avoiding code duplication for the file/inode/dentry setup.
使用anon_inode_getxxx()创建的所有文件将共享一个inode(anon_inode_inode)
从而 "节省内存" 并 避免 代码("file/inode/dentry" 设置代码)重复。
root@ubuntu:~/temp# ll /proc/5398/fd
lr-x-1 x x 64 Aug 49:98-> anon_inode:inotify
lrwx-1 x x 64 Aug 49:94-> anon_inode:[eventpoll]
lrwx-1 x x 64 Aug 49:95-> anon_inode:[signalfd]
lrwx-1 x x 64 Aug 49:97-> anon_inode:[timerfd]
lrwx-1 x x 64 Aug 49:99-> anon_inode:[eventpoll]
lr-x--1 x x 64 Aug 2409:3910->/proc/5398/mountinfo
lr-x--1 x x 64 Aug 2409:3912->/proc/swaps