aboutsummaryrefslogtreecommitdiffstats
path: root/net/devlink/devl_internal.h
diff options
context:
space:
mode:
authorIdo Schimmel <[email protected]>2023-11-15 12:17:13 +0000
committerDavid S. Miller <[email protected]>2023-11-18 17:38:50 +0000
commitd32c38256db30a2d55b849e2c77342bc70d58c6e (patch)
treefb9eef733990d40c112de1e6f9ed61d23d6dbff1 /net/devlink/devl_internal.h
parentdevlink: Enable the use of private flags in post_doit operations (diff)
downloadkernel-d32c38256db30a2d55b849e2c77342bc70d58c6e.tar.gz
kernel-d32c38256db30a2d55b849e2c77342bc70d58c6e.zip
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 <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/devlink/devl_internal.h')
-rw-r--r--net/devlink/devl_internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/devlink/devl_internal.h b/net/devlink/devl_internal.h
index 178abaf74a10..5ea2e2012e93 100644
--- a/net/devlink/devl_internal.h
+++ b/net/devlink/devl_internal.h
@@ -152,7 +152,8 @@ typedef int devlink_nl_dump_one_func_t(struct sk_buff *msg,
int flags);
struct devlink *
-devlink_get_from_attrs_lock(struct net *net, struct nlattr **attrs);
+devlink_get_from_attrs_lock(struct net *net, struct nlattr **attrs,
+ bool dev_lock);
int devlink_nl_dumpit(struct sk_buff *msg, struct netlink_callback *cb,
devlink_nl_dump_one_func_t *dump_one);