aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_fw.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-11-19 08:03:09 +0000
committerDavid S. Miller <davem@davemloft.net>2008-11-20 04:14:28 -0800
commit47a1a1d4be2910b13a8e90f75c17e253c39531ff (patch)
treec900f283bd96f0b26236152ada24f9a113f65e2b /net/sched/cls_fw.c
parentpkt_sched: remove unnecessary xchg() in packet schedulers (diff)
downloadlinux-dev-47a1a1d4be2910b13a8e90f75c17e253c39531ff.tar.xz
linux-dev-47a1a1d4be2910b13a8e90f75c17e253c39531ff.zip
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 <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/sched/cls_fw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index b0f90e593af0..6d6e87585fb1 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -148,7 +148,7 @@ fw_delete_filter(struct tcf_proto *tp, struct fw_filter *f)
static void fw_destroy(struct tcf_proto *tp)
{
- struct fw_head *head = (struct fw_head*)xchg(&tp->root, NULL);
+ struct fw_head *head = tp->root;
struct fw_filter *f;
int h;