diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2018-11-26 09:42:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-27 19:20:19 -0500 |
commit | 74be39ebba36e98a973ddb914fb41dc9e5129e36 (patch) | |
tree | 7bcde4847f2d6fa398823fbf8e9e9087e26b23a3 /net/core/net_namespace.c | |
parent | 3251a2ff951393bcc4dafb68331162f20a3ad304 (diff) |
netns: remove net arg from rtnl_net_fill()
This argument is not used anymore.
Fixes: cab3c8ec8d57 ("netns: always provide the id to rtnl_net_fill()")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net_namespace.c')
-rw-r--r-- | net/core/net_namespace.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index fefe72774aeb..52b9620e3457 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -739,7 +739,7 @@ static int rtnl_net_get_size(void) | |||
739 | } | 739 | } |
740 | 740 | ||
741 | static int rtnl_net_fill(struct sk_buff *skb, u32 portid, u32 seq, int flags, | 741 | static int rtnl_net_fill(struct sk_buff *skb, u32 portid, u32 seq, int flags, |
742 | int cmd, struct net *net, int nsid) | 742 | int cmd, int nsid) |
743 | { | 743 | { |
744 | struct nlmsghdr *nlh; | 744 | struct nlmsghdr *nlh; |
745 | struct rtgenmsg *rth; | 745 | struct rtgenmsg *rth; |
@@ -801,7 +801,7 @@ static int rtnl_net_getid(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
801 | 801 | ||
802 | id = peernet2id(net, peer); | 802 | id = peernet2id(net, peer); |
803 | err = rtnl_net_fill(msg, NETLINK_CB(skb).portid, nlh->nlmsg_seq, 0, | 803 | err = rtnl_net_fill(msg, NETLINK_CB(skb).portid, nlh->nlmsg_seq, 0, |
804 | RTM_NEWNSID, net, id); | 804 | RTM_NEWNSID, id); |
805 | if (err < 0) | 805 | if (err < 0) |
806 | goto err_out; | 806 | goto err_out; |
807 | 807 | ||
@@ -816,7 +816,6 @@ out: | |||
816 | } | 816 | } |
817 | 817 | ||
818 | struct rtnl_net_dump_cb { | 818 | struct rtnl_net_dump_cb { |
819 | struct net *net; | ||
820 | struct sk_buff *skb; | 819 | struct sk_buff *skb; |
821 | struct netlink_callback *cb; | 820 | struct netlink_callback *cb; |
822 | int idx; | 821 | int idx; |
@@ -833,7 +832,7 @@ static int rtnl_net_dumpid_one(int id, void *peer, void *data) | |||
833 | 832 | ||
834 | ret = rtnl_net_fill(net_cb->skb, NETLINK_CB(net_cb->cb->skb).portid, | 833 | ret = rtnl_net_fill(net_cb->skb, NETLINK_CB(net_cb->cb->skb).portid, |
835 | net_cb->cb->nlh->nlmsg_seq, NLM_F_MULTI, | 834 | net_cb->cb->nlh->nlmsg_seq, NLM_F_MULTI, |
836 | RTM_NEWNSID, net_cb->net, id); | 835 | RTM_NEWNSID, id); |
837 | if (ret < 0) | 836 | if (ret < 0) |
838 | return ret; | 837 | return ret; |
839 | 838 | ||
@@ -846,7 +845,6 @@ static int rtnl_net_dumpid(struct sk_buff *skb, struct netlink_callback *cb) | |||
846 | { | 845 | { |
847 | struct net *net = sock_net(skb->sk); | 846 | struct net *net = sock_net(skb->sk); |
848 | struct rtnl_net_dump_cb net_cb = { | 847 | struct rtnl_net_dump_cb net_cb = { |
849 | .net = net, | ||
850 | .skb = skb, | 848 | .skb = skb, |
851 | .cb = cb, | 849 | .cb = cb, |
852 | .idx = 0, | 850 | .idx = 0, |
@@ -876,7 +874,7 @@ static void rtnl_net_notifyid(struct net *net, int cmd, int id) | |||
876 | if (!msg) | 874 | if (!msg) |
877 | goto out; | 875 | goto out; |
878 | 876 | ||
879 | err = rtnl_net_fill(msg, 0, 0, 0, cmd, net, id); | 877 | err = rtnl_net_fill(msg, 0, 0, 0, cmd, id); |
880 | if (err < 0) | 878 | if (err < 0) |
881 | goto err_out; | 879 | goto err_out; |
882 | 880 | ||