summaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2012-09-12 16:12:03 +0200
committerTejun Heo <tj@kernel.org>2012-09-14 09:57:28 -0700
commit51e4e7faba786d33e5e33f8776c5027a1c8d6fb7 (patch)
tree47d935eca61b5cfe12012117e7460f2814c0d10d /net/core/sock.c
parent8fb974c937570be38f944986456467b39a2dc252 (diff)
downloadlinux-51e4e7faba786d33e5e33f8776c5027a1c8d6fb7.tar.gz
linux-51e4e7faba786d33e5e33f8776c5027a1c8d6fb7.tar.bz2
linux-51e4e7faba786d33e5e33f8776c5027a1c8d6fb7.zip
cgroup: net_prio: Do not define task_netpioidx() when not selected
task_netprioidx() should not be defined in case the configuration is CONFIG_NETPRIO_CGROUP=n. The reason is that in a following patch the net_prio_subsys_id will only be defined if CONFIG_NETPRIO_CGROUP!=n. When net_prio is not built at all any callee should only get an empty task_netprioidx() without any references to net_prio_subsys_id. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Cc: Gao feng <gaofeng@cn.fujitsu.com> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: John Fastabend <john.r.fastabend@intel.com> Cc: netdev@vger.kernel.org Cc: cgroups@vger.kernel.org
Diffstat (limited to 'net/core/sock.c')
-rw-r--r--net/core/sock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 82cadc62a872..ca3eaee66056 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1237,6 +1237,7 @@ void sock_update_classid(struct sock *sk)
EXPORT_SYMBOL(sock_update_classid);
#endif
+#if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
void sock_update_netprioidx(struct sock *sk, struct task_struct *task)
{
if (in_interrupt())
@@ -1246,6 +1247,7 @@ void sock_update_netprioidx(struct sock *sk, struct task_struct *task)
}
EXPORT_SYMBOL_GPL(sock_update_netprioidx);
#endif
+#endif
/**
* sk_alloc - All socket objects are allocated here