Skip to content
Commit 88d642fa authored by Tejun Heo's avatar Tejun Heo
Browse files

netprio_cgroup: use cgroup->id instead of cgroup_netprio_state->prioidx



With priomap expansion no longer depending on knowing max id
allocated, netprio_cgroup can use cgroup->id insted of cs->prioidx.
Drop prioidx alloc/free logic and convert all uses to cgroup->id.

* In cgrp_css_alloc(), parent->id test is moved above @cs allocation
  to simplify error path.

* In cgrp_css_free(), @cs assignment is made initialization.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Tested-and-Acked-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4a6ee25c
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