Commit e1af5e44 authored by Gao feng's avatar Gao feng Committed by David S. Miller

cgroup: netprio: remove unnecessary task_netprioidx

Since the tasks have been migrated to the cgroup,
there is no need to call task_netprioidx to get
task's cgroup id.
Signed-off-by: default avatarGao feng <gaofeng@cn.fujitsu.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fbf8866d
...@@ -222,11 +222,10 @@ static void net_prio_attach(struct cgroup_subsys_state *css, ...@@ -222,11 +222,10 @@ static void net_prio_attach(struct cgroup_subsys_state *css,
struct cgroup_taskset *tset) struct cgroup_taskset *tset)
{ {
struct task_struct *p; struct task_struct *p;
void *v; void *v = (void *)(unsigned long)css->cgroup->id;
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_netprioidx(p);
iterate_fd(p->files, 0, update_netprio, v); iterate_fd(p->files, 0, update_netprio, v);
task_unlock(p); task_unlock(p);
} }
......
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