summaryrefslogtreecommitdiff
path: root/net/netlink
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2015-09-22 19:56:43 +0300
committerDavid S. Miller <davem@davemloft.net>2015-09-24 22:25:23 +0300
commit92c14d9b5ee86fd6cf136c01b6a87353522aebdd (patch)
tree06a095b1c2f948b3a045e12406b0ca8020c20bf5 /net/netlink
parent06e60e5912c0373b15143cc52e4a11fafeaafff3 (diff)
downloadlinux-92c14d9b5ee86fd6cf136c01b6a87353522aebdd.tar.xz
genetlink: simplify genl_notify
The genl_notify function has too many arguments for no real reason - all callers use genl_info to get them anyway. Just pass the genl_info down to genl_notify. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/genetlink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 2ed5f964772e..75724a96aef2 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -1136,19 +1136,19 @@ int genlmsg_multicast_allns(struct genl_family *family, struct sk_buff *skb,
}
EXPORT_SYMBOL(genlmsg_multicast_allns);
-void genl_notify(struct genl_family *family,
- struct sk_buff *skb, struct net *net, u32 portid, u32 group,
- struct nlmsghdr *nlh, gfp_t flags)
+void genl_notify(struct genl_family *family, struct sk_buff *skb,
+ struct genl_info *info, u32 group, gfp_t flags)
{
+ struct net *net = genl_info_net(info);
struct sock *sk = net->genl_sock;
int report = 0;
- if (nlh)
- report = nlmsg_report(nlh);
+ if (info->nlhdr)
+ report = nlmsg_report(info->nlhdr);
if (WARN_ON_ONCE(group >= family->n_mcgrps))
return;
group = family->mcgrp_offset + group;
- nlmsg_notify(sk, skb, portid, group, report, flags);
+ nlmsg_notify(sk, skb, info->snd_portid, group, report, flags);
}
EXPORT_SYMBOL(genl_notify);