From: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx> Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Gao feng <gaofeng@xxxxxxxxxxxxxx> Cc: Jamal Hadi Salim <jhs@xxxxxxxxxxxx> Cc: John Fastabend <john.r.fastabend@xxxxxxxxx> Cc: Li Zefan <lizefan@xxxxxxxxxx> Cc: Neil Horman <nhorman@xxxxxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: netdev@xxxxxxxxxxxxxxx Cc: cgroups@xxxxxxxxxxxxxxx --- include/net/netprio_cgroup.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/include/net/netprio_cgroup.h b/include/net/netprio_cgroup.h index ab22019..180ff5e 100644 --- a/include/net/netprio_cgroup.h +++ b/include/net/netprio_cgroup.h @@ -35,24 +35,15 @@ extern void sock_update_netprioidx(struct sock *sk, struct task_struct *task); #if IS_BUILTIN(CONFIG_NETPRIO_CGROUP) -static inline u32 task_netprioidx(struct task_struct *p) -{ - struct cgroup_netprio_state *state; - u32 idx; - - rcu_read_lock(); - state = container_of(task_subsys_state(p, net_prio_subsys_id), - struct cgroup_netprio_state, css); - idx = state->prioidx; - rcu_read_unlock(); - return idx; -} +#define netpriocg_enabled 1 #elif IS_MODULE(CONFIG_NETPRIO_CGROUP) extern struct static_key cgroup_netprio_enabled; #define netpriocg_enabled static_key_false(&cgroup_netprio_enabled) +#endif + static inline u32 task_netprioidx(struct task_struct *p) { struct cgroup_netprio_state *state; @@ -69,8 +60,6 @@ static inline u32 task_netprioidx(struct task_struct *p) return idx; } -#endif - #else /* !CONFIG_NETPRIO_CGROUP */ static inline u32 task_netprioidx(struct task_struct *p) -- 1.7.12.rc1.16.g05a20c8 -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html