diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/netprio_cgroup.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/include/net/netprio_cgroup.h b/include/net/netprio_cgroup.h index dafc09f0fdbc..b7ff5bd3c3c3 100644 --- a/include/net/netprio_cgroup.h +++ b/include/net/netprio_cgroup.h | |||
| @@ -27,7 +27,6 @@ struct netprio_map { | |||
| 27 | 27 | ||
| 28 | void sock_update_netprioidx(struct sock *sk); | 28 | void sock_update_netprioidx(struct sock *sk); |
| 29 | 29 | ||
| 30 | #if IS_BUILTIN(CONFIG_CGROUP_NET_PRIO) | ||
| 31 | static inline u32 task_netprioidx(struct task_struct *p) | 30 | static inline u32 task_netprioidx(struct task_struct *p) |
| 32 | { | 31 | { |
| 33 | struct cgroup_subsys_state *css; | 32 | struct cgroup_subsys_state *css; |
| @@ -39,20 +38,6 @@ static inline u32 task_netprioidx(struct task_struct *p) | |||
| 39 | rcu_read_unlock(); | 38 | rcu_read_unlock(); |
| 40 | return idx; | 39 | return idx; |
| 41 | } | 40 | } |
| 42 | #elif IS_MODULE(CONFIG_CGROUP_NET_PRIO) | ||
| 43 | static inline u32 task_netprioidx(struct task_struct *p) | ||
| 44 | { | ||
| 45 | struct cgroup_subsys_state *css; | ||
| 46 | u32 idx = 0; | ||
| 47 | |||
| 48 | rcu_read_lock(); | ||
| 49 | css = task_css(p, net_prio_subsys_id); | ||
| 50 | if (css) | ||
| 51 | idx = css->cgroup->id; | ||
| 52 | rcu_read_unlock(); | ||
| 53 | return idx; | ||
| 54 | } | ||
| 55 | #endif | ||
| 56 | #else /* !CONFIG_CGROUP_NET_PRIO */ | 41 | #else /* !CONFIG_CGROUP_NET_PRIO */ |
| 57 | static inline u32 task_netprioidx(struct task_struct *p) | 42 | static inline u32 task_netprioidx(struct task_struct *p) |
| 58 | { | 43 | { |
