[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
@@ -143,6 +143,13 @@ static inline void dst_hold(struct dst_entry * dst)
|
||||
atomic_inc(&dst->__refcnt);
|
||||
}
|
||||
|
||||
static inline void dst_use(struct dst_entry *dst, unsigned long time)
|
||||
{
|
||||
dst_hold(dst);
|
||||
dst->__use++;
|
||||
dst->lastuse = time;
|
||||
}
|
||||
|
||||
static inline
|
||||
struct dst_entry * dst_clone(struct dst_entry * dst)
|
||||
{
|
||||
|
Reference in New Issue
Block a user