net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq
Replace the bh safe variant with the hard irq safe variant. We need a hard irq safe variant to deal with netpoll transmitting packets from hard irq context, and we need it in most if not all of the places using the bh safe variant. Except on 32bit uni-processor the code is exactly the same so don't bother with a bh variant, just have a hard irq safe variant that everyone can use. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
85dcce7a73
commit
57a7744e09
@@ -1000,16 +1000,16 @@ static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev,
|
||||
u64 tpackets, tbytes, rpackets, rbytes;
|
||||
|
||||
do {
|
||||
start = u64_stats_fetch_begin_bh(&stats->tx_syncp);
|
||||
start = u64_stats_fetch_begin_irq(&stats->tx_syncp);
|
||||
tpackets = stats->tx_packets;
|
||||
tbytes = stats->tx_bytes;
|
||||
} while (u64_stats_fetch_retry_bh(&stats->tx_syncp, start));
|
||||
} while (u64_stats_fetch_retry_irq(&stats->tx_syncp, start));
|
||||
|
||||
do {
|
||||
start = u64_stats_fetch_begin_bh(&stats->rx_syncp);
|
||||
start = u64_stats_fetch_begin_irq(&stats->rx_syncp);
|
||||
rpackets = stats->rx_packets;
|
||||
rbytes = stats->rx_bytes;
|
||||
} while (u64_stats_fetch_retry_bh(&stats->rx_syncp, start));
|
||||
} while (u64_stats_fetch_retry_irq(&stats->rx_syncp, start));
|
||||
|
||||
tot->rx_packets += rpackets;
|
||||
tot->tx_packets += tpackets;
|
||||
|
Reference in New Issue
Block a user