From 64b7d96167977850f4a24e52dd0a76b03c6542cf Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Tue, 11 Dec 2007 02:00:30 -0800 Subject: [NET]: dst_ifdown() cleanup This cleanup shrinks size of net/core/dst.o on i386 from 1299 to 1289 bytes. (This is because dev_hold()/dev_put() are doing atomic_inc()/atomic_dec() and force compiler to re-evaluate memory contents.) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- net/core/dst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/core') diff --git a/net/core/dst.c b/net/core/dst.c index 5c6cfc4e7fdb..7eceebaabaaa 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -284,8 +284,8 @@ static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev, dev_put(dev); if (dst->neighbour && dst->neighbour->dev == dev) { dst->neighbour->dev = dst->dev; + dev_hold(dst->dev); dev_put(dev); - dev_hold(dst->neighbour->dev); } } } -- cgit v1.2.3