hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/net/core/netprio_cgroup.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * 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.
84 *
95 * Authors: Neil Horman <nhorman@tuxdriver.com>
106 */
....@@ -97,7 +93,7 @@
9793 static u32 netprio_prio(struct cgroup_subsys_state *css, struct net_device *dev)
9894 {
9995 struct netprio_map *map = rcu_dereference_rtnl(dev->priomap);
100
- int id = css->cgroup->id;
96
+ int id = css->id;
10197
10298 if (map && id < map->priomap_len)
10399 return map->priomap[id];
....@@ -117,7 +113,7 @@
117113 struct net_device *dev, u32 prio)
118114 {
119115 struct netprio_map *map;
120
- int id = css->cgroup->id;
116
+ int id = css->id;
121117 int ret;
122118
123119 /* avoid extending priomap for zero writes */
....@@ -181,7 +177,7 @@
181177
182178 static u64 read_prioidx(struct cgroup_subsys_state *css, struct cftype *cft)
183179 {
184
- return css->cgroup->id;
180
+ return css->id;
185181 }
186182
187183 static int read_priomap(struct seq_file *sf, void *v)
....@@ -243,7 +239,7 @@
243239 cgroup_sk_alloc_disable();
244240
245241 cgroup_taskset_for_each(p, css, tset) {
246
- void *v = (void *)(unsigned long)css->cgroup->id;
242
+ void *v = (void *)(unsigned long)css->id;
247243
248244 task_lock(p);
249245 iterate_fd(p->files, 0, update_netprio, v);
....@@ -303,6 +299,4 @@
303299 register_netdevice_notifier(&netprio_device_notifier);
304300 return 0;
305301 }
306
-
307302 subsys_initcall(init_cgroup_netprio);
308
-MODULE_LICENSE("GPL v2");