Skip to content

Commit

Permalink
[NET]: dst_ifdown() cleanup
Browse files Browse the repository at this point in the history
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 <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 28, 2008
1 parent 0050112 commit 64b7d96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 64b7d96

Please sign in to comment.