Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327207
b: refs/heads/master
c: 8fb974c
h: refs/heads/master
i:
  327205: f394e83
  327203: 1b840d8
  327199: b2fbec9
v: v3
  • Loading branch information
Daniel Wagner authored and Tejun Heo committed Sep 14, 2012
1 parent 505438e commit a0b79f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3419807716be503c06f399b2bcbc68823be3a78
refs/heads/master: 8fb974c937570be38f944986456467b39a2dc252
11 changes: 6 additions & 5 deletions trunk/include/net/cls_cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/hardirq.h>
#include <linux/rcupdate.h>

#ifdef CONFIG_CGROUPS
#if IS_ENABLED(CONFIG_NET_CLS_CGROUP)
struct cgroup_cls_state
{
struct cgroup_subsys_state css;
Expand All @@ -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;
Expand All @@ -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)
Expand All @@ -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)
{
}
Expand All @@ -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 */
2 changes: 2 additions & 0 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down

0 comments on commit a0b79f2

Please sign in to comment.