summaryrefslogtreecommitdiffstats
path: root/net/core/netprio_cgroup.c
diff options
context:
space:
mode:
authorGao feng <gaofeng@cn.fujitsu.com>2013-10-08 11:05:19 +0800
committerDavid S. Miller <davem@davemloft.net>2013-10-08 16:27:34 -0400
commite1af5e445ef8582e8f690fadcd63797db1e62663 (patch)
tree442f3472b43a75df6145af50f8263570592bae22 /net/core/netprio_cgroup.c
parentfbf8866d65d5de84f75563eb0edd7fc27dbe9a90 (diff)
downloadlinux-e1af5e445ef8582e8f690fadcd63797db1e62663.tar.gz
linux-e1af5e445ef8582e8f690fadcd63797db1e62663.tar.bz2
linux-e1af5e445ef8582e8f690fadcd63797db1e62663.zip
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: Gao feng <gaofeng@cn.fujitsu.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netprio_cgroup.c')
-rw-r--r--net/core/netprio_cgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
index d9cd627e6a16..9b7cf6c85f82 100644
--- a/net/core/netprio_cgroup.c
+++ b/net/core/netprio_cgroup.c
@@ -222,11 +222,10 @@ static void net_prio_attach(struct cgroup_subsys_state *css,
struct cgroup_taskset *tset)
{
struct task_struct *p;
- void *v;
+ void *v = (void *)(unsigned long)css->cgroup->id;
cgroup_taskset_for_each(p, css, tset) {
task_lock(p);
- v = (void *)(unsigned long)task_netprioidx(p);
iterate_fd(p->files, 0, update_netprio, v);
task_unlock(p);
}