8000 ipv6: Remove un-used argument from ip6_dst_alloc() · bsd-unix/linux@ad70686 · GitHub
[go: up one dir, main page]

Skip to content

Commit ad70686

Browse files
iamkafaidavem330
authored andcommitted
ipv6: Remove un-used argument from ip6_dst_alloc()
After 4b32b5a ("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: Martin KaFai Lau <kafai@fb.com> CC: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 776829d commit ad70686

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

net/ipv6/route.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ static const struct rt6_info ip6_blk_hole_entry_template = {
318318
/* allocate dst with ip6_dst_ops */
319319
static struct rt6_info *__ip6_dst_alloc(struct net *net,
320320
struct net_device *dev,
321-
int flags,
322-
struct fib6_table *table)
321+
int flags)
323322
{
324323
struct rt6_info *rt = dst_alloc(&net->ipv6.ip6_dst_ops, dev,
325324
0, DST_OBSOLETE_FORCE_CHK, flags);
@@ -336,10 +335,9 @@ static struct rt6_info *__ip6_dst_alloc(struct net *net,
336335

337336
static struct rt6_info *ip6_dst_alloc(struct net *net,
338337
struct net_device *dev,
339-
int flags,
340-
struct fib6_table *table)
338+
int flags)
341339
{
342-
struct rt6_info *rt = __ip6_dst_alloc(net, dev, flags, table);
340+
struct rt6_info *rt = __ip6_dst_alloc(net, dev, flags);
343341

344342
if (rt) {
345343
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,
950948
if (ort->rt6i_flags & (RTF_CACHE | RTF_PCPU))
951949
ort = (struct rt6_info *)ort->dst.from;
952950

953-
rt = __ip6_dst_alloc(dev_net(ort->dst.dev), ort->dst.dev,
954-
0, ort->rt6i_table);
951+
rt = __ip6_dst_alloc(dev_net(ort->dst.dev), ort->dst.dev, 0);
955952

956953
if (!rt)
957954
return NULL;
@@ -983,8 +980,7 @@ static struct rt6_info *ip6_rt_pcpu_alloc(struct rt6_info *rt)
983980
struct rt6_info *pcpu_rt;
984981

985982
pcpu_rt = __ip6_dst_alloc(dev_net(rt->dst.dev),
986-
rt->dst.dev, rt->dst.flags,
987-
rt->rt6i_table);
983+
rt->dst.dev, rt->dst.flags);
988984

989985
if (!pcpu_rt)
990986
return NULL;
@@ -1555,7 +1551,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
15551551
if (unlikely(!idev))
15561552
return ERR_PTR(-ENODEV);
15571553

1558-
rt = ip6_dst_alloc(net, dev, 0, NULL);
1554+
rt = ip6_dst_alloc(net, dev, 0);
15591555
if (unlikely(!rt)) {
15601556
in6_dev_put(idev);
15611557
dst = ERR_PTR(-ENOMEM);
@@ -1742,7 +1738,8 @@ int ip6_route_add(struct fib6_config *cfg)
17421738
if (!table)
17431739
goto out;
17441740

1745-
rt = ip6_dst_alloc(net, NULL, (cfg->fc_flags & RTF_ADDRCONF) ? 0 : DST_NOCOUNT, table);
1741+
rt = ip6_dst_alloc(net, NULL,
1742+
(cfg->fc_flags & RTF_ADDRCONF) ? 0 : DST_NOCOUNT);
17461743

17471744
if (!rt) {
17481745
err = -ENOMEM;
@@ -2399,7 +2396,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
23992396
{
24002397
struct net *net = dev_net(idev->dev);
24012398
struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev,
2402-
DST_NOCOUNT, NULL);
2399+
DST_NOCOUNT);
24032400
if (!rt)
24042401
return ERR_PTR(-ENOMEM);
24052402

0 commit comments

Comments
 (0)
0