]> git.itanic.dy.fi Git - linux-stable/commit
devlink: Allow taking device lock in pre_doit operations
authorIdo Schimmel <idosch@nvidia.com>
Wed, 15 Nov 2023 12:17:13 +0000 (13:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Nov 2023 17:38:50 +0000 (17:38 +0000)
commitd32c38256db30a2d55b849e2c77342bc70d58c6e
treefb9eef733990d40c112de1e6f9ed61d23d6dbff1
parentc8d0a7d6152bec970552786b77626f4b4c562f4d
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>
net/devlink/devl_internal.h
net/devlink/health.c
net/devlink/netlink.c
net/devlink/region.c