summaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorPavel Emelyanov2007-11-11 06:28:34 +0100
committerDavid S. Miller2007-11-11 06:28:34 +0100
commit03f49f345749abc08bc84b835433c94eea6e972b (patch)
tree8fad6fef152adaa473e2ab3a824cb04fe98b3bf1 /net/ipv6/route.c
parent[IPV4]: Remove bugus goto-s from ip_route_input_slow (diff)
downloadkernel-qcow2-linux-03f49f345749abc08bc84b835433c94eea6e972b.tar.gz
kernel-qcow2-linux-03f49f345749abc08bc84b835433c94eea6e972b.tar.xz
kernel-qcow2-linux-03f49f345749abc08bc84b835433c94eea6e972b.zip
[NET]: Make helper to get dst entry and "use" it
There are many places that get the dst entry, increase the __use counter and set the "lastuse" time stamp. Make a helper for this. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 973a97abc446..6ecb5e6fae2e 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -544,12 +544,8 @@ restart:
rt = rt6_device_match(rt, fl->oif, flags);
BACKTRACK(&fl->fl6_src);
out:
- dst_hold(&rt->u.dst);
+ dst_use(&rt->u.dst, jiffies);
read_unlock_bh(&table->tb6_lock);
-
- rt->u.dst.lastuse = jiffies;
- rt->u.dst.__use++;
-
return rt;
}