Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247969
b: refs/heads/master
c: 3137663
h: refs/heads/master
i:
  247967: 64d4f17
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 23, 2011
1 parent 234c726 commit a221f3a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6df427fe8c481d3be437cbe8bd366bdac82b73c4
refs/heads/master: 3137663dfb43bb3e3174e9da81db0c05f395fc1b
17 changes: 15 additions & 2 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,9 +815,17 @@ static bool some_qdisc_is_busy(struct net_device *dev)
return false;
}

/**
* dev_deactivate_many - deactivate transmissions on several devices
* @head: list of devices to deactivate
*
* This function returns only when all outstanding transmissions
* have completed, unless all devices are in dismantle phase.
*/
void dev_deactivate_many(struct list_head *head)
{
struct net_device *dev;
bool sync_needed = false;

list_for_each_entry(dev, head, unreg_list) {
netdev_for_each_tx_queue(dev, dev_deactivate_queue,
Expand All @@ -827,10 +835,15 @@ void dev_deactivate_many(struct list_head *head)
&noop_qdisc);

dev_watchdog_down(dev);
sync_needed |= !dev->dismantle;
}

/* Wait for outstanding qdisc-less dev_queue_xmit calls. */
synchronize_rcu();
/* Wait for outstanding qdisc-less dev_queue_xmit calls.
* This is avoided if all devices are in dismantle phase :
* Caller will call synchronize_net() for us
*/
if (sync_needed)
synchronize_net();

/* Wait for outstanding qdisc_run calls. */
list_for_each_entry(dev, head, unreg_list)
Expand Down

0 comments on commit a221f3a

Please sign in to comment.