Needed to hide refdst details. Signed-off-by: Julian Anastasov <ja@xxxxxx> --- include/net/dst.h | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/include/net/dst.h b/include/net/dst.h index 853cda1..967f42a 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -264,10 +264,22 @@ static inline struct dst_entry *dst_clone(struct dst_entry *dst) extern void dst_release(struct dst_entry *dst); +/* Get noref version of dst */ +static inline struct dst_entry *dst_get_noref(struct dst_entry *dst) +{ + return (struct dst_entry *) ((unsigned long) dst | SKB_DST_NOREF); +} + +/* Return dst pointer from refdst */ +static inline struct dst_entry *refdst_ptr(unsigned long refdst) +{ + return (struct dst_entry *)(refdst & SKB_DST_PTRMASK); +} + static inline void refdst_drop(unsigned long refdst) { if (!(refdst & SKB_DST_NOREF)) - dst_release((struct dst_entry *)(refdst & SKB_DST_PTRMASK)); + dst_release(refdst_ptr(refdst)); } /** -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe lvs-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html