Commit 390b421c authored by Ulf Magnusson's avatar Ulf Magnusson Committed by Jonathan Corbet

sysfs.txt: fix pre-kernfs sysfs_dirent reference

sysfs_dirent went away when kernfs was extracted from sysfs. The reference
to the kobject now lives in a kernfs_node (in the 'priv' member).

See commit 324a56e1 ("kernfs: s/sysfs_dirent/kernfs_node/ and rename
its friends accordingly").
Signed-off-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 121e0248
...@@ -40,7 +40,7 @@ ancestors of object hierarchies; i.e. the subsystems the objects ...@@ -40,7 +40,7 @@ ancestors of object hierarchies; i.e. the subsystems the objects
belong to. belong to.
Sysfs internally stores a pointer to the kobject that implements a Sysfs internally stores a pointer to the kobject that implements a
directory in the sysfs_dirent object associated with the directory. In directory in the kernfs_node object associated with the directory. In
the past this kobject pointer has been used by sysfs to do reference the past this kobject pointer has been used by sysfs to do reference
counting directly on the kobject whenever the file is opened or closed. counting directly on the kobject whenever the file is opened or closed.
With the current sysfs implementation the kobject reference count is With the current sysfs implementation the kobject reference count is
......
...@@ -61,7 +61,7 @@ Documentation/kobject.txt 文档以获得更多关于 kobject 接口的 ...@@ -61,7 +61,7 @@ Documentation/kobject.txt 文档以获得更多关于 kobject 接口的
内核的对象层次到用户空间。sysfs 中的顶层目录代表着内核对象层次的 内核的对象层次到用户空间。sysfs 中的顶层目录代表着内核对象层次的
共同祖先;例如:某些对象属于某个子系统。 共同祖先;例如:某些对象属于某个子系统。
Sysfs 在与其目录关联的 sysfs_dirent 对象中内部保存一个指向实现 Sysfs 在与其目录关联的 kernfs_node 对象中内部保存一个指向实现
目录的 kobject 的指针。以前,这个 kobject 指针被 sysfs 直接用于 目录的 kobject 的指针。以前,这个 kobject 指针被 sysfs 直接用于
kobject 文件打开和关闭的引用计数。而现在的 sysfs 实现中,kobject kobject 文件打开和关闭的引用计数。而现在的 sysfs 实现中,kobject
引用计数只能通过 sysfs_schedule_callback() 函数直接修改。 引用计数只能通过 sysfs_schedule_callback() 函数直接修改。
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment