return dst;
}
+extern const char dst_underflow_bug_msg[];
+
static inline
void dst_release(struct dst_entry * dst)
{
if (dst) {
- if (atomic_read(&dst->__refcnt) < 1) {
- printk("BUG: dst underflow %d: %p\n",
- atomic_read(&dst->__refcnt),
- current_text_addr());
- }
+ if (atomic_read(&dst->__refcnt) < 1)
+ printk(dst_underflow_bug_msg,
+ atomic_read(&dst->__refcnt),
+ dst, current_text_addr());
atomic_dec(&dst->__refcnt);
}
}
__dst_free(dst);
}
+static inline void dst_rcu_free(struct rcu_head *head)
+{
+ struct dst_entry *dst = container_of(head, struct dst_entry, rcu_head);
+ dst_free(dst);
+}
+
static inline void dst_confirm(struct dst_entry *dst)
{
if (dst)