Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ccfe6d4 authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by David S. Miller
Browse files

ipv4/route: arg delay is useless in rt_cache_flush()



Since route cache deletion (89aef892), delay is no
more used. Remove it.

Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dbe9a417
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ extern struct ip_rt_acct __percpu *ip_rt_acct;

struct in_device;
extern int		ip_rt_init(void);
extern void		rt_cache_flush(struct net *net, int how);
extern void		rt_cache_flush(struct net *net);
extern void		rt_flush_dev(struct net_device *dev);
extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp);
extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp,
+1 −1
Original line number Diff line number Diff line
@@ -1225,7 +1225,7 @@ static int arp_netdev_event(struct notifier_block *this, unsigned long event,
	switch (event) {
	case NETDEV_CHANGEADDR:
		neigh_changeaddr(&arp_tbl, dev);
		rt_cache_flush(dev_net(dev), 0);
		rt_cache_flush(dev_net(dev));
		break;
	default:
		break;
+3 −3
Original line number Diff line number Diff line
@@ -1500,7 +1500,7 @@ static int devinet_conf_proc(ctl_table *ctl, int write,
		if (i == IPV4_DEVCONF_ACCEPT_LOCAL - 1 ||
		    i == IPV4_DEVCONF_ROUTE_LOCALNET - 1)
			if ((new_value == 0) && (old_value != 0))
				rt_cache_flush(net, 0);
				rt_cache_flush(net);
	}

	return ret;
@@ -1534,7 +1534,7 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
				dev_disable_lro(idev->dev);
			}
			rtnl_unlock();
			rt_cache_flush(net, 0);
			rt_cache_flush(net);
		}
	}

@@ -1551,7 +1551,7 @@ static int ipv4_doint_and_flush(ctl_table *ctl, int write,
	struct net *net = ctl->extra2;

	if (write && *valp != val)
		rt_cache_flush(net, 0);
		rt_cache_flush(net);

	return ret;
}
+10 −10
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ static void fib_flush(struct net *net)
	}

	if (flushed)
		rt_cache_flush(net, -1);
		rt_cache_flush(net);
}

/*
@@ -999,11 +999,11 @@ static void nl_fib_lookup_exit(struct net *net)
	net->ipv4.fibnl = NULL;
}

static void fib_disable_ip(struct net_device *dev, int force, int delay)
static void fib_disable_ip(struct net_device *dev, int force)
{
	if (fib_sync_down_dev(dev, force))
		fib_flush(dev_net(dev));
	rt_cache_flush(dev_net(dev), delay);
	rt_cache_flush(dev_net(dev));
	arp_ifdown(dev);
}

@@ -1020,7 +1020,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
		fib_sync_up(dev);
#endif
		atomic_inc(&net->ipv4.dev_addr_genid);
		rt_cache_flush(dev_net(dev), -1);
		rt_cache_flush(dev_net(dev));
		break;
	case NETDEV_DOWN:
		fib_del_ifaddr(ifa, NULL);
@@ -1029,9 +1029,9 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
			/* Last address was deleted from this interface.
			 * Disable IP.
			 */
			fib_disable_ip(dev, 1, 0);
			fib_disable_ip(dev, 1);
		} else {
			rt_cache_flush(dev_net(dev), -1);
			rt_cache_flush(dev_net(dev));
		}
		break;
	}
@@ -1045,7 +1045,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
	struct net *net = dev_net(dev);

	if (event == NETDEV_UNREGISTER) {
		fib_disable_ip(dev, 2, -1);
		fib_disable_ip(dev, 2);
		rt_flush_dev(dev);
		return NOTIFY_DONE;
	}
@@ -1061,14 +1061,14 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
		fib_sync_up(dev);
#endif
		atomic_inc(&net->ipv4.dev_addr_genid);
		rt_cache_flush(net, -1);
		rt_cache_flush(net);
		break;
	case NETDEV_DOWN:
		fib_disable_ip(dev, 0, 0);
		fib_disable_ip(dev, 0);
		break;
	case NETDEV_CHANGEMTU:
	case NETDEV_CHANGE:
		rt_cache_flush(net, 0);
		rt_cache_flush(net);
		break;
	}
	return NOTIFY_DONE;
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ static size_t fib4_rule_nlmsg_payload(struct fib_rule *rule)

static void fib4_rule_flush_cache(struct fib_rules_ops *ops)
{
	rt_cache_flush(ops->fro_net, -1);
	rt_cache_flush(ops->fro_net);
}

static const struct fib_rules_ops __net_initdata fib4_rules_ops_template = {
Loading