ipv4: Cleanup struct net dereference in rt_intern_hash
authorPavel Emelyanov <xemul@openvz.org>
Wed, 24 Mar 2010 07:43:17 +0000 (07:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Mar 2010 03:57:35 +0000 (20:57 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c

index 54fd68c14c87d9aad528e9ae07a27efc633cfa40..124af1605d10824ae7875cc096e7007845727107 100644 (file)
@@ -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);
                }
        }