Subject: [PATCH v2] pkt_sched: Remove smp_wmb() in qdisc_watchdog()

From: Jarek Poplawski <[email-masked]>
Date: Mon, 22 Dec 2008 07:57:05 +0000

On Fri, Dec 19, 2008 at 06:18:51PM -0800, Stephen Hemminger wrote:
...
> The barrier was copied from earlier version of tbf is unnecessary.

So I resend this patch with only a changelog updated

Thanks,
Jarek P.
---------->
While implementing a TCQ_F_THROTTLED flag there was used an smp_wmb()
in qdisc_watchdog(). Stephen Hemminger acknowledged the barrier was
copied from earlier version of tbf and is unnecessaray, so it's
removed here.

Signed-off-by: Jarek Poplawski <[email-masked]>
---

 net/sched/sch_api.c   |    1 -
 net/sched/sch_netem.c |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 6bc29e8..0fc4a18 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -450,7 +450,6 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer)
 						 timer);
 
 	wd->qdisc->flags &= ~TCQ_F_THROTTLED;
-	smp_wmb();
 	__netif_schedule(qdisc_root(wd->qdisc));
 
 	return HRTIMER_NORESTART;
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 7e78f1c..d876b87 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -266,7 +266,6 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
 	struct netem_sched_data *q = qdisc_priv(sch);
 	struct sk_buff *skb;
 
-	smp_mb();
 	if (sch->flags & TCQ_F_THROTTLED)
 		return NULL;