提交 116e0575 编写于 作者: L Lai Jiangshan 提交者: Linus Torvalds

devcgroup: use list_for_each_entry_rcu()

We should use list_for_each_entry_rcu in RCU read site.
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a47295e6
...@@ -517,7 +517,7 @@ int devcgroup_inode_mknod(int mode, dev_t dev) ...@@ -517,7 +517,7 @@ int devcgroup_inode_mknod(int mode, dev_t dev)
dev_cgroup = task_devcgroup(current); dev_cgroup = task_devcgroup(current);
list_for_each_entry(wh, &dev_cgroup->whitelist, list) { list_for_each_entry_rcu(wh, &dev_cgroup->whitelist, list) {
if (wh->type & DEV_ALL) if (wh->type & DEV_ALL)
goto acc_check; goto acc_check;
if ((wh->type & DEV_BLOCK) && !S_ISBLK(mode)) if ((wh->type & DEV_BLOCK) && !S_ISBLK(mode))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册