[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>
This commit is contained in:

committed by
David S. Miller

parent
b1667609cd
commit
03f49f3457
@@ -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;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user