Commit ad706862 authored by Martin KaFai Lau's avatar Martin KaFai Lau Committed by David S. Miller

ipv6: Remove un-used argument from ip6_dst_alloc()

After 4b32b5ad ("ipv6: Stop rt6_info from using inet_peer's metrics"),
ip6_dst_alloc() does not need the 'table' argument.  This patch
cleans it up.
Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 776829de
...@@ -318,8 +318,7 @@ static const struct rt6_info ip6_blk_hole_entry_template = { ...@@ -318,8 +318,7 @@ static const struct rt6_info ip6_blk_hole_entry_template = {
/* allocate dst with ip6_dst_ops */ /* allocate dst with ip6_dst_ops */
static struct rt6_info *__ip6_dst_alloc(struct net *net, static struct rt6_info *__ip6_dst_alloc(struct net *net,
struct net_device *dev, struct net_device *dev,
int flags, int flags)
struct fib6_table *table)
{ {
struct rt6_info *rt = dst_alloc(&net->ipv6.ip6_dst_ops, dev, struct rt6_info *rt = dst_alloc(&net->ipv6.ip6_dst_ops, dev,
0, DST_OBSOLETE_FORCE_CHK, flags); 0, DST_OBSOLETE_FORCE_CHK, flags);
...@@ -336,10 +335,9 @@ static struct rt6_info *__ip6_dst_alloc(struct net *net, ...@@ -336,10 +335,9 @@ static struct rt6_info *__ip6_dst_alloc(struct net *net,
static struct rt6_info *ip6_dst_alloc(struct net *net, static struct rt6_info *ip6_dst_alloc(struct net *net,
struct net_device *dev, struct net_device *dev,
int flags, int flags)
struct fib6_table *table)
{ {
struct rt6_info *rt = __ip6_dst_alloc(net, dev, flags, table); struct rt6_info *rt = __ip6_dst_alloc(net, dev, flags);
if (rt) { if (rt) {
rt->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, GFP_ATOMIC); rt->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, GFP_ATOMIC);
...@@ -950,8 +948,7 @@ static struct rt6_info *ip6_rt_cache_alloc(struct rt6_info *ort, ...@@ -950,8 +948,7 @@ static struct rt6_info *ip6_rt_cache_alloc(struct rt6_info *ort,
if (ort->rt6i_flags & (RTF_CACHE | RTF_PCPU)) if (ort->rt6i_flags & (RTF_CACHE | RTF_PCPU))
ort = (struct rt6_info *)ort->dst.from; ort = (struct rt6_info *)ort->dst.from;
rt = __ip6_dst_alloc(dev_net(ort->dst.dev), ort->dst.dev, rt = __ip6_dst_alloc(dev_net(ort->dst.dev), ort->dst.dev, 0);
0, ort->rt6i_table);
if (!rt) if (!rt)
return NULL; return NULL;
...@@ -983,8 +980,7 @@ static struct rt6_info *ip6_rt_pcpu_alloc(struct rt6_info *rt) ...@@ -983,8 +980,7 @@ static struct rt6_info *ip6_rt_pcpu_alloc(struct rt6_info *rt)
struct rt6_info *pcpu_rt; struct rt6_info *pcpu_rt;
pcpu_rt = __ip6_dst_alloc(dev_net(rt->dst.dev), pcpu_rt = __ip6_dst_alloc(dev_net(rt->dst.dev),
rt->dst.dev, rt->dst.flags, rt->dst.dev, rt->dst.flags);
rt->rt6i_table);
if (!pcpu_rt) if (!pcpu_rt)
return NULL; return NULL;
...@@ -1555,7 +1551,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, ...@@ -1555,7 +1551,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
if (unlikely(!idev)) if (unlikely(!idev))
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
rt = ip6_dst_alloc(net, dev, 0, NULL); rt = ip6_dst_alloc(net, dev, 0);
if (unlikely(!rt)) { if (unlikely(!rt)) {
in6_dev_put(idev); in6_dev_put(idev);
dst = ERR_PTR(-ENOMEM); dst = ERR_PTR(-ENOMEM);
...@@ -1742,7 +1738,8 @@ int ip6_route_add(struct fib6_config *cfg) ...@@ -1742,7 +1738,8 @@ int ip6_route_add(struct fib6_config *cfg)
if (!table) if (!table)
goto out; goto out;
rt = ip6_dst_alloc(net, NULL, (cfg->fc_flags & RTF_ADDRCONF) ? 0 : DST_NOCOUNT, table); rt = ip6_dst_alloc(net, NULL,
(cfg->fc_flags & RTF_ADDRCONF) ? 0 : DST_NOCOUNT);
if (!rt) { if (!rt) {
err = -ENOMEM; err = -ENOMEM;
...@@ -2399,7 +2396,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, ...@@ -2399,7 +2396,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
{ {
struct net *net = dev_net(idev->dev); struct net *net = dev_net(idev->dev);
struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev, struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev,
DST_NOCOUNT, NULL); DST_NOCOUNT);
if (!rt) if (!rt)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment