Commit 64b7d961 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

[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: default avatarEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00501121
...@@ -284,8 +284,8 @@ static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev, ...@@ -284,8 +284,8 @@ static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
dev_put(dev); dev_put(dev);
if (dst->neighbour && dst->neighbour->dev == dev) { if (dst->neighbour && dst->neighbour->dev == dev) {
dst->neighbour->dev = dst->dev; dst->neighbour->dev = dst->dev;
dev_hold(dst->dev);
dev_put(dev); dev_put(dev);
dev_hold(dst->neighbour->dev);
} }
} }
} }
......
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