Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "net: phy: improve mdiobus_stats_acct"

This reverts commit 1afccc5a201ec7c9023370958bae1312369b64da.

As reported by Marek the change causes a warning on non-PREEMPT_RT
32 bit systems.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/c3a1aba9-3fae-4c4b-bcb1-fb620fb7a309@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Heiner Kallweit and committed by
Jakub Kicinski
1a994031 8e235bc4

+8 -3
+8 -3
drivers/net/phy/mdio_bus.c
··· 358 358 359 359 static void mdiobus_stats_acct(struct mdio_bus_stats *stats, bool op, int ret) 360 360 { 361 + preempt_disable(); 361 362 u64_stats_update_begin(&stats->syncp); 362 363 363 364 u64_stats_inc(&stats->transfers); 364 - if (ret < 0) 365 + if (ret < 0) { 365 366 u64_stats_inc(&stats->errors); 366 - else if (op) 367 + goto out; 368 + } 369 + 370 + if (op) 367 371 u64_stats_inc(&stats->reads); 368 372 else 369 373 u64_stats_inc(&stats->writes); 370 - 374 + out: 371 375 u64_stats_update_end(&stats->syncp); 376 + preempt_enable(); 372 377 } 373 378 374 379 /**