Commit f3419807 authored by Daniel Wagner's avatar Daniel Wagner Committed by Tejun Heo

cgroup: net_cls: Move sock_update_classid() declaration to cls_cgroup.h

The only user of sock_update_classid() is net/socket.c which happens
to include cls_cgroup.h directly.

tj: Fix build breakage due to missing cls_cgroup.h inclusion in
    drivers/net/tun.c reported in linux-next by Stephen.
Signed-off-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarLi Zefan <lizefan@huawei.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
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
parent 83b061fc
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
#include <net/netns/generic.h> #include <net/netns/generic.h>
#include <net/rtnetlink.h> #include <net/rtnetlink.h>
#include <net/sock.h> #include <net/sock.h>
#include <net/cls_cgroup.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -24,6 +24,8 @@ struct cgroup_cls_state ...@@ -24,6 +24,8 @@ struct cgroup_cls_state
u32 classid; u32 classid;
}; };
extern void sock_update_classid(struct sock *sk);
#ifdef CONFIG_NET_CLS_CGROUP #ifdef CONFIG_NET_CLS_CGROUP
static inline u32 task_cls_classid(struct task_struct *p) static inline u32 task_cls_classid(struct task_struct *p)
{ {
...@@ -62,6 +64,10 @@ static inline u32 task_cls_classid(struct task_struct *p) ...@@ -62,6 +64,10 @@ static inline u32 task_cls_classid(struct task_struct *p)
} }
#endif #endif
#else #else
static inline void sock_update_classid(struct sock *sk)
{
}
static inline u32 task_cls_classid(struct task_struct *p) static inline u32 task_cls_classid(struct task_struct *p)
{ {
return 0; return 0;
......
...@@ -1486,14 +1486,6 @@ extern void *sock_kmalloc(struct sock *sk, int size, ...@@ -1486,14 +1486,6 @@ extern void *sock_kmalloc(struct sock *sk, int size,
extern void sock_kfree_s(struct sock *sk, void *mem, int size); extern void sock_kfree_s(struct sock *sk, void *mem, int size);
extern void sk_send_sigurg(struct sock *sk); extern void sk_send_sigurg(struct sock *sk);
#ifdef CONFIG_CGROUPS
extern void sock_update_classid(struct sock *sk);
#else
static inline void sock_update_classid(struct sock *sk)
{
}
#endif
/* /*
* Functions to fill in entries in struct proto_ops when a protocol * Functions to fill in entries in struct proto_ops when a protocol
* does not implement a particular function. * does not implement a particular function.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment