From 47a1a1d4be2910b13a8e90f75c17e253c39531ff Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Wed, 19 Nov 2008 08:03:09 +0000 Subject: pkt_sched: remove unnecessary xchg() in packet classifiers The use of xchg() hasn't been necessary since 2.2.something when proper locking was added to packet schedulers. In the case of classifiers they mostly weren't even necessary before that since they're mainly used to assign a NULL pointer to the filter root in the ->destroy path; the root is destroyed immediately after that. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- net/sched/cls_cgroup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'net/sched/cls_cgroup.c') diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 53ada2c0e41c..0d68b1975983 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c @@ -201,9 +201,7 @@ static int cls_cgroup_change(struct tcf_proto *tp, unsigned long base, static void cls_cgroup_destroy(struct tcf_proto *tp) { - struct cls_cgroup_head *head; - - head = (struct cls_cgroup_head *)xchg(&tp->root, NULL); + struct cls_cgroup_head *head = tp->root; if (head) { tcf_exts_destroy(tp, &head->exts); -- cgit v1.2.3