aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_cgroup.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-06-03 05:43:41 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-03 05:43:41 -0400
commitb2f8f7525c8aa1fdd8ad8c72c832dfb571d5f768 (patch)
tree71ae1801d264bca62efa0d22376b49de7f206e9a /net/sched/cls_cgroup.c
parentd455e5b165a367a628110ec2d18807ea10052cd1 (diff)
parent12186be7d2e1106cede1cc728526e3d7998cbe94 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/forcedeth.c
Diffstat (limited to 'net/sched/cls_cgroup.c')
-rw-r--r--net/sched/cls_cgroup.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index 1ab4542e61e0..0f815cc6a3db 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -98,8 +98,7 @@ static int cls_cgroup_classify(struct sk_buff *skb, struct tcf_proto *tp,
98 struct tcf_result *res) 98 struct tcf_result *res)
99{ 99{
100 struct cls_cgroup_head *head = tp->root; 100 struct cls_cgroup_head *head = tp->root;
101 struct cgroup_cls_state *cs; 101 u32 classid;
102 int ret = 0;
103 102
104 /* 103 /*
105 * Due to the nature of the classifier it is required to ignore all 104 * Due to the nature of the classifier it is required to ignore all
@@ -115,17 +114,18 @@ static int cls_cgroup_classify(struct sk_buff *skb, struct tcf_proto *tp,
115 return -1; 114 return -1;
116 115
117 rcu_read_lock(); 116 rcu_read_lock();
118 cs = task_cls_state(current); 117 classid = task_cls_state(current)->classid;
119 if (cs->classid && tcf_em_tree_match(skb, &head->ematches, NULL)) {
120 res->classid = cs->classid;
121 res->class = 0;
122 ret = tcf_exts_exec(skb, &head->exts, res);
123 } else
124 ret = -1;
125
126 rcu_read_unlock(); 118 rcu_read_unlock();
127 119
128 return ret; 120 if (!classid)
121 return -1;
122
123 if (!tcf_em_tree_match(skb, &head->ematches, NULL))
124 return -1;
125
126 res->classid = classid;
127 res->class = 0;
128 return tcf_exts_exec(skb, &head->exts, res);
129} 129}
130 130
131static unsigned long cls_cgroup_get(struct tcf_proto *tp, u32 handle) 131static unsigned long cls_cgroup_get(struct tcf_proto *tp, u32 handle)