diff options
author | Ido Schimmel <idosch@nvidia.com> | 2023-11-15 13:17:13 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-11-18 17:38:50 +0000 |
commit | d32c38256db30a2d55b849e2c77342bc70d58c6e (patch) | |
tree | fb9eef733990d40c112de1e6f9ed61d23d6dbff1 /net/devlink/health.c | |
parent | c8d0a7d6152bec970552786b77626f4b4c562f4d (diff) |
devlink: Allow taking device lock in pre_doit operations
Introduce a new private flag ('DEVLINK_NL_FLAG_NEED_DEV_LOCK') to allow
netlink commands to specify that they need to acquire the device lock in
their pre_doit operation and release it in their post_doit operation.
The reload command will use this flag in the subsequent patch.
No functional changes intended.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/devlink/health.c')
-rw-r--r-- | net/devlink/health.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/devlink/health.c b/net/devlink/health.c index 695df61f8ac2..71ae121dc739 100644 --- a/net/devlink/health.c +++ b/net/devlink/health.c @@ -1151,7 +1151,8 @@ devlink_health_reporter_get_from_cb_lock(struct netlink_callback *cb) struct nlattr **attrs = info->attrs; struct devlink *devlink; - devlink = devlink_get_from_attrs_lock(sock_net(cb->skb->sk), attrs); + devlink = devlink_get_from_attrs_lock(sock_net(cb->skb->sk), attrs, + false); if (IS_ERR(devlink)) return NULL; |