提交 21cb860c 编写于 作者: V Vlad Buslov 提交者: Jakub Kicinski

Revert "net: devlink: add RNLT lock assertion to devlink_compat_switch_id_get()"

This reverts commit 6005a8ae.

The assertion was intentionally removed in commit 043b8413 ("net:
devlink: remove redundant rtnl lock assert") and, contrary what is
described in the commit message, the comment reflects that: "Caller must
hold RTNL mutex or reference to dev...".
Signed-off-by: NVlad Buslov <vladbu@nvidia.com>
Tested-by: NLeon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20220829121324.3980376-1-vladbu@nvidia.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 d5ccda92
...@@ -12437,8 +12437,6 @@ int devlink_compat_switch_id_get(struct net_device *dev, ...@@ -12437,8 +12437,6 @@ int devlink_compat_switch_id_get(struct net_device *dev,
* devlink_port instance cannot disappear in the middle. No need to take * devlink_port instance cannot disappear in the middle. No need to take
* any devlink lock as only permanent values are accessed. * any devlink lock as only permanent values are accessed.
*/ */
ASSERT_RTNL();
devlink_port = netdev_to_devlink_port(dev); devlink_port = netdev_to_devlink_port(dev);
if (!devlink_port || !devlink_port->switch_port) if (!devlink_port || !devlink_port->switch_port)
return -EOPNOTSUPP; return -EOPNOTSUPP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册