* [PATCH 1/2] ipv4: Cleanup struct net dereference in rt_intern_hash
@ 2010-03-24 17:43 Pavel Emelyanov
2010-03-27 3:58 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Emelyanov @ 2010-03-24 17:43 UTC (permalink / raw)
To: David Miller; +Cc: Eric Dumazet, Neil Horman, Linux Netdev List
There's no need in getting it 3 times and gcc isn't smart enough
to understand this himself.
This is just a cleanup before the fix (next patch).
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
net/ipv4/route.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 32d3961..28c1c2f 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1212,11 +1212,11 @@ restart:
slow_chain_length(rt_hash_table[hash].chain) > rt_chain_length_max) {
struct net *net = dev_net(rt->u.dst.dev);
int num = ++net->ipv4.current_rt_cache_rebuild_count;
- if (!rt_caching(dev_net(rt->u.dst.dev))) {
+ if (!rt_caching(net)) {
printk(KERN_WARNING "%s: %d rebuilds is over limit, route caching disabled\n",
rt->u.dst.dev->name, num);
}
- rt_emergency_hash_rebuild(dev_net(rt->u.dst.dev));
+ rt_emergency_hash_rebuild(net);
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] ipv4: Cleanup struct net dereference in rt_intern_hash
2010-03-24 17:43 [PATCH 1/2] ipv4: Cleanup struct net dereference in rt_intern_hash Pavel Emelyanov
@ 2010-03-27 3:58 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-27 3:58 UTC (permalink / raw)
To: xemul; +Cc: dada1, nhorman, netdev
From: Pavel Emelyanov <xemul@openvz.org>
Date: Wed, 24 Mar 2010 20:43:17 +0300
> There's no need in getting it 3 times and gcc isn't smart enough
> to understand this himself.
>
> This is just a cleanup before the fix (next patch).
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-27 3:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 17:43 [PATCH 1/2] ipv4: Cleanup struct net dereference in rt_intern_hash Pavel Emelyanov
2010-03-27 3:58 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.