提交 d5c97c10 编写于 作者: J Javi Merino 提交者: Greg Kroah-Hartman

kref: Fix typo in kref documentation

container_of() should refer to the struct created in the example.
Signed-off-by: NJavi Merino <cibervicho@gmail.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f1a304e7
...@@ -156,7 +156,7 @@ static struct my_data *get_entry() ...@@ -156,7 +156,7 @@ static struct my_data *get_entry()
struct my_data *entry = NULL; struct my_data *entry = NULL;
mutex_lock(&mutex); mutex_lock(&mutex);
if (!list_empty(&q)) { if (!list_empty(&q)) {
entry = container_of(q.next, struct my_q_entry, link); entry = container_of(q.next, struct my_data, link);
kref_get(&entry->refcount); kref_get(&entry->refcount);
} }
mutex_unlock(&mutex); mutex_unlock(&mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册