Commit 70ef7d8
net: transfer rtnl_lock() requirement from ethtool_set_ethtool_phy_ops() to caller
phy_init() and phy_exit() will have to do more stuff under rtnl_lock()
in a future change. Since rtnl_unlock() -> netdev_run_todo() does a lot
of stuff under the hood, it's a pity to lock and unlock the rtnetlink
mutex twice in a row.
Change the calling convention such that the only caller of
ethtool_set_ethtool_phy_ops(), phy_device.c, provides a context where
the rtnl_mutex is already acquired.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20230801142824.1772134-11-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 54e1ed6 commit 70ef7d8
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
3451 | 3452 | | |
3452 | 3453 | | |
3453 | 3454 | | |
| 3455 | + | |
3454 | 3456 | | |
| 3457 | + | |
3455 | 3458 | | |
3456 | 3459 | | |
3457 | 3460 | | |
| |||
3474 | 3477 | | |
3475 | 3478 | | |
3476 | 3479 | | |
| 3480 | + | |
3477 | 3481 | | |
| 3482 | + | |
3478 | 3483 | | |
3479 | 3484 | | |
3480 | 3485 | | |
| |||
3484 | 3489 | | |
3485 | 3490 | | |
3486 | 3491 | | |
| 3492 | + | |
3487 | 3493 | | |
| 3494 | + | |
3488 | 3495 | | |
3489 | 3496 | | |
3490 | 3497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
| 668 | + | |
669 | 669 | | |
670 | | - | |
671 | 670 | | |
672 | 671 | | |
673 | 672 | | |
| |||
0 commit comments