mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 07:08:07 +00:00
cgroup: cls: remove unnecessary task_cls_classid
We can get classid through cgroup_subsys_state, this is directviewing and effective. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e1af5e445e
commit
ff0bfad6a2
1 changed files with 2 additions and 2 deletions
|
@ -72,11 +72,11 @@ static void cgrp_attach(struct cgroup_subsys_state *css,
|
||||||
struct cgroup_taskset *tset)
|
struct cgroup_taskset *tset)
|
||||||
{
|
{
|
||||||
struct task_struct *p;
|
struct task_struct *p;
|
||||||
void *v;
|
struct cgroup_cls_state *cs = css_cls_state(css);
|
||||||
|
void *v = (void *)(unsigned long)cs->classid;
|
||||||
|
|
||||||
cgroup_taskset_for_each(p, css, tset) {
|
cgroup_taskset_for_each(p, css, tset) {
|
||||||
task_lock(p);
|
task_lock(p);
|
||||||
v = (void *)(unsigned long)task_cls_classid(p);
|
|
||||||
iterate_fd(p->files, 0, update_classid, v);
|
iterate_fd(p->files, 0, update_classid, v);
|
||||||
task_unlock(p);
|
task_unlock(p);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue