mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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>
This commit is contained in:
committed by
David S. Miller
parent
c8d0a7d615
commit
d32c38256d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user