diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-01-19 19:00:31 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-01-19 19:08:38 -0800 |
commit | 1c5cc012339d14510821497bafc5c179bc4a81b6 (patch) | |
tree | 98b94d83848ae35db03d954ffb62a6908df1789a /net/devlink/core.c | |
parent | 854617f52ab4241896190abac7688eaaf6774451 (diff) | |
parent | 63ba54a52c417a0c632a5f85a2b912b8a2320358 (diff) |
Merge branch 'devlink-linecard-and-reporters-locking-cleanup'
Jiri Pirko says:
====================
devlink: linecard and reporters locking cleanup
This patchset does not change functionality.
Patches 1-2 remove linecards lock and reference counting, converting
them to be protected by devlink instance lock as the rest of
the objects.
Patches 3-4 fix the mlx5 auxiliary device devlink locking scheme whis is
needed for proper reporters lock conversion done in the following
patches.
Patches 5-8 remove reporters locks and reference counting, converting
them to be protected by devlink instance lock as the rest of
the objects.
Patches 9 and 10 convert linecards and reporters dumpit callbacks to
recently introduced devlink_nl_instance_iter_dump() infra.
Patch 11 removes no longer needed devlink_dump_for_each_instance_get()
helper.
The last patch adds assertion to devl_is_registered() as dependency on
other locks is removed.
====================
Link: https://lore.kernel.org/r/20230118152115.1113149-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/devlink/core.c')
-rw-r--r-- | net/devlink/core.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/devlink/core.c b/net/devlink/core.c index 60beca2df7cc..6c0e2fc57e45 100644 --- a/net/devlink/core.c +++ b/net/devlink/core.c @@ -246,8 +246,6 @@ struct devlink *devlink_alloc_ns(const struct devlink_ops *ops, lockdep_register_key(&devlink->lock_key); mutex_init(&devlink->lock); lockdep_set_class(&devlink->lock, &devlink->lock_key); - mutex_init(&devlink->reporters_lock); - mutex_init(&devlink->linecards_lock); refcount_set(&devlink->refcount, 1); return devlink; @@ -269,8 +267,6 @@ void devlink_free(struct devlink *devlink) { ASSERT_DEVLINK_NOT_REGISTERED(devlink); - mutex_destroy(&devlink->linecards_lock); - mutex_destroy(&devlink->reporters_lock); WARN_ON(!list_empty(&devlink->trap_policer_list)); WARN_ON(!list_empty(&devlink->trap_group_list)); WARN_ON(!list_empty(&devlink->trap_list)); |