Skip to content

Commit c8d0a7d

Browse files
idoschdavem330
authored andcommitted
devlink: Enable the use of private flags in post_doit operations
Currently, private flags (e.g., 'DEVLINK_NL_FLAG_NEED_PORT') are only used in pre_doit operations, but a subsequent patch will need to conditionally lock and unlock the device lock in pre and post doit operations, respectively. As a preparation, enable the use of private flags in post_doit operations in a similar fashion to how it is done for pre_doit operations. 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]>
1 parent e21c52d commit c8d0a7d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

net/devlink/netlink.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ int devlink_nl_pre_doit_port_optional(const struct genl_split_ops *ops,
141141
return __devlink_nl_pre_doit(skb, info, DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT);
142142
}
143143

144-
void devlink_nl_post_doit(const struct genl_split_ops *ops,
145-
struct sk_buff *skb, struct genl_info *info)
144+
static void __devlink_nl_post_doit(struct sk_buff *skb, struct genl_info *info,
145+
u8 flags)
146146
{
147147
struct devlink *devlink;
148148

@@ -151,6 +151,12 @@ void devlink_nl_post_doit(const struct genl_split_ops *ops,
151151
devlink_put(devlink);
152152
}
153153

154+
void devlink_nl_post_doit(const struct genl_split_ops *ops,
155+
struct sk_buff *skb, struct genl_info *info)
156+
{
157+
__devlink_nl_post_doit(skb, info, 0);
158+
}
159+
154160
static int devlink_nl_inst_single_dumpit(struct sk_buff *msg,
155161
struct netlink_callback *cb, int flags,
156162
devlink_nl_dump_one_func_t *dump_one,

0 commit comments

Comments
 (0)