.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * net/core/netprio_cgroup.c Priority Control Group |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or |
---|
5 | | - * modify it under the terms of the GNU General Public License |
---|
6 | | - * as published by the Free Software Foundation; either version |
---|
7 | | - * 2 of the License, or (at your option) any later version. |
---|
8 | 4 | * |
---|
9 | 5 | * Authors: Neil Horman <nhorman@tuxdriver.com> |
---|
10 | 6 | */ |
---|
.. | .. |
---|
97 | 93 | static u32 netprio_prio(struct cgroup_subsys_state *css, struct net_device *dev) |
---|
98 | 94 | { |
---|
99 | 95 | struct netprio_map *map = rcu_dereference_rtnl(dev->priomap); |
---|
100 | | - int id = css->cgroup->id; |
---|
| 96 | + int id = css->id; |
---|
101 | 97 | |
---|
102 | 98 | if (map && id < map->priomap_len) |
---|
103 | 99 | return map->priomap[id]; |
---|
.. | .. |
---|
117 | 113 | struct net_device *dev, u32 prio) |
---|
118 | 114 | { |
---|
119 | 115 | struct netprio_map *map; |
---|
120 | | - int id = css->cgroup->id; |
---|
| 116 | + int id = css->id; |
---|
121 | 117 | int ret; |
---|
122 | 118 | |
---|
123 | 119 | /* avoid extending priomap for zero writes */ |
---|
.. | .. |
---|
181 | 177 | |
---|
182 | 178 | static u64 read_prioidx(struct cgroup_subsys_state *css, struct cftype *cft) |
---|
183 | 179 | { |
---|
184 | | - return css->cgroup->id; |
---|
| 180 | + return css->id; |
---|
185 | 181 | } |
---|
186 | 182 | |
---|
187 | 183 | static int read_priomap(struct seq_file *sf, void *v) |
---|
.. | .. |
---|
243 | 239 | cgroup_sk_alloc_disable(); |
---|
244 | 240 | |
---|
245 | 241 | cgroup_taskset_for_each(p, css, tset) { |
---|
246 | | - void *v = (void *)(unsigned long)css->cgroup->id; |
---|
| 242 | + void *v = (void *)(unsigned long)css->id; |
---|
247 | 243 | |
---|
248 | 244 | task_lock(p); |
---|
249 | 245 | iterate_fd(p->files, 0, update_netprio, v); |
---|
.. | .. |
---|
303 | 299 | register_netdevice_notifier(&netprio_device_notifier); |
---|
304 | 300 | return 0; |
---|
305 | 301 | } |
---|
306 | | - |
---|
307 | 302 | subsys_initcall(init_cgroup_netprio); |
---|
308 | | -MODULE_LICENSE("GPL v2"); |
---|