From a0b79f2296da47db9b9a6680d807df2e403cadac Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Wed, 12 Sep 2012 16:12:02 +0200 Subject: [PATCH] --- yaml --- r: 327207 b: refs/heads/master c: 8fb974c937570be38f944986456467b39a2dc252 h: refs/heads/master i: 327205: f394e836a1a432975641f035e680da3c267664ea 327203: 1b840d875d445a99d8725dd6b09fd59fae5300c1 327199: b2fbec92f2795cc54c75e937a1eded437133caf2 v: v3 --- [refs] | 2 +- trunk/include/net/cls_cgroup.h | 11 ++++++----- trunk/net/core/sock.c | 2 ++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 23bdc7e646c4..01bd6d62fc23 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f3419807716be503c06f399b2bcbc68823be3a78 +refs/heads/master: 8fb974c937570be38f944986456467b39a2dc252 diff --git a/trunk/include/net/cls_cgroup.h b/trunk/include/net/cls_cgroup.h index e88527a68454..9bd5db9e10ba 100644 --- a/trunk/include/net/cls_cgroup.h +++ b/trunk/include/net/cls_cgroup.h @@ -17,7 +17,7 @@ #include #include -#ifdef CONFIG_CGROUPS +#if IS_ENABLED(CONFIG_NET_CLS_CGROUP) struct cgroup_cls_state { struct cgroup_subsys_state css; @@ -26,7 +26,7 @@ struct cgroup_cls_state extern void sock_update_classid(struct sock *sk); -#ifdef CONFIG_NET_CLS_CGROUP +#if IS_BUILTIN(CONFIG_NET_CLS_CGROUP) static inline u32 task_cls_classid(struct task_struct *p) { int classid; @@ -41,7 +41,8 @@ static inline u32 task_cls_classid(struct task_struct *p) return classid; } -#else +#elif IS_MODULE(CONFIG_NET_CLS_CGROUP) + extern int net_cls_subsys_id; static inline u32 task_cls_classid(struct task_struct *p) @@ -63,7 +64,7 @@ static inline u32 task_cls_classid(struct task_struct *p) return classid; } #endif -#else +#else /* !CGROUP_NET_CLS_CGROUP */ static inline void sock_update_classid(struct sock *sk) { } @@ -72,5 +73,5 @@ static inline u32 task_cls_classid(struct task_struct *p) { return 0; } -#endif +#endif /* CGROUP_NET_CLS_CGROUP */ #endif /* _NET_CLS_CGROUP_H */ diff --git a/trunk/net/core/sock.c b/trunk/net/core/sock.c index 8f67ced8d6a8..82cadc62a872 100644 --- a/trunk/net/core/sock.c +++ b/trunk/net/core/sock.c @@ -1223,6 +1223,7 @@ static void sk_prot_free(struct proto *prot, struct sock *sk) } #ifdef CONFIG_CGROUPS +#if IS_ENABLED(CONFIG_NET_CLS_CGROUP) void sock_update_classid(struct sock *sk) { u32 classid; @@ -1234,6 +1235,7 @@ void sock_update_classid(struct sock *sk) sk->sk_classid = classid; } EXPORT_SYMBOL(sock_update_classid); +#endif void sock_update_netprioidx(struct sock *sk, struct task_struct *task) {