This reverts commit 1afccc5a201ec7c9023370958bae1312369b64da. As reported by Marek the change causes a warning on non-PREEMPT_RT 32 bit systems. Reported-by: Marek Szyprowski --- drivers/net/phy/mdio_bus.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index cf5ce1ed48c..00d0e4159e9 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -60,17 +60,22 @@ EXPORT_SYMBOL(mdiobus_is_registered_device); static void mdiobus_stats_acct(struct mdio_bus_stats *stats, bool op, int ret) { + preempt_disable(); u64_stats_update_begin(&stats->syncp); u64_stats_inc(&stats->transfers); - if (ret < 0) + if (ret < 0) { u64_stats_inc(&stats->errors); - else if (op) + goto out; + } + + if (op) u64_stats_inc(&stats->reads); else u64_stats_inc(&stats->writes); - +out: u64_stats_update_end(&stats->syncp); + preempt_enable(); } /** -- 2.53.0