Skip to contentSkip to conversation

NET : dst_ifdown() cleanup

PATCH Applied Eric Dumazet 2 participants 2 messages Dec 11, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.)

net/core/dst.c +1 -1
index 5c6cfc4..7eceeba 100644
@@ -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);
 		}
 	}
 }
maintainer Applied
#1 lore raw

From: Eric Dumazet <[email protected]>
Date: Tue, 11 Dec 2007 04:59:22 +0100

Quoted 5 lines

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.)

Applied to net-2.6.25, thanks Eric.