net: Define accessors to manipulate QDISC_STATE_RUNNING

Define three helpers to manipulate QDISC_STATE_RUNNIG flag, that a
second patch will move on another location.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet
2010-06-02 03:23:51 -07:00
committed by David S. Miller
parent 9f26f547a5
commit bc135b23d0
4 changed files with 20 additions and 5 deletions

View File

@@ -205,7 +205,7 @@ void __qdisc_run(struct Qdisc *q)
}
}
clear_bit(__QDISC_STATE_RUNNING, &q->state);
qdisc_run_end(q);
}
unsigned long dev_trans_start(struct net_device *dev)
@@ -797,7 +797,7 @@ static bool some_qdisc_is_busy(struct net_device *dev)
spin_lock_bh(root_lock);
val = (test_bit(__QDISC_STATE_RUNNING, &q->state) ||
val = (qdisc_is_running(q) ||
test_bit(__QDISC_STATE_SCHED, &q->state));
spin_unlock_bh(root_lock);