mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
devlink: introduce a helper for netlink multicast send
Introduce a helper devlink_nl_notify_send() so each object notification function does not have to call genlmsg_multicast_netns() with the same arguments. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
@@ -217,8 +217,7 @@ static void devlink_notify(struct devlink *devlink, enum devlink_command cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
genlmsg_multicast_netns(&devlink_nl_family, devlink_net(devlink),
|
||||
msg, 0, DEVLINK_MCGRP_CONFIG, GFP_KERNEL);
|
||||
devlink_nl_notify_send(devlink, msg);
|
||||
}
|
||||
|
||||
int devlink_nl_get_doit(struct sk_buff *skb, struct genl_info *info)
|
||||
@@ -1013,8 +1012,7 @@ static void __devlink_flash_update_notify(struct devlink *devlink,
|
||||
if (err)
|
||||
goto out_free_msg;
|
||||
|
||||
genlmsg_multicast_netns(&devlink_nl_family, devlink_net(devlink),
|
||||
msg, 0, DEVLINK_MCGRP_CONFIG, GFP_KERNEL);
|
||||
devlink_nl_notify_send(devlink, msg);
|
||||
return;
|
||||
|
||||
out_free_msg:
|
||||
|
||||
Reference in New Issue
Block a user