aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorGravatar Jakub Kicinski <kuba@kernel.org> 2022-03-14 23:00:08 -0700
committerGravatar Jakub Kicinski <kuba@kernel.org> 2022-03-16 12:56:42 -0700
commit49e83bbe8cc32e197fccf4f617b3fa2fedc27a23 (patch)
tree8d98f6d02fa3ebf2358e8a9c0a0394c83ebef8b2 /net
parenteth: mlxsw: switch to explicit locking for port registration (diff)
downloadlinux-49e83bbe8cc32e197fccf4f617b3fa2fedc27a23.tar.gz
linux-49e83bbe8cc32e197fccf4f617b3fa2fedc27a23.tar.bz2
linux-49e83bbe8cc32e197fccf4f617b3fa2fedc27a23.zip
devlink: hold the instance lock in port_split / port_unsplit callbacks
Let the core take the devlink instance lock around port splitting and remove the now redundant locking in the drivers. Reviewed-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/core/devlink.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 769e5f7fa219..545ae784e9d2 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -8672,14 +8672,12 @@ static const struct genl_small_ops devlink_nl_ops[] = {
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_port_split_doit,
.flags = GENL_ADMIN_PERM,
- .internal_flags = DEVLINK_NL_FLAG_NO_LOCK,
},
{
.cmd = DEVLINK_CMD_PORT_UNSPLIT,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_port_unsplit_doit,
.flags = GENL_ADMIN_PERM,
- .internal_flags = DEVLINK_NL_FLAG_NO_LOCK,
},
{
.cmd = DEVLINK_CMD_PORT_NEW,