From 8888c5d78438948abde4a6ffda2e7f761007ad11 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 21 Oct 2004 07:49:37 -0700 Subject: [PATCH] [NET]: Replace dst_release refcount error with standard WARN_ON Replace the dst count underflow bug message with a standard WARN message. This makes errors noticeable and also reduces the kernel text size by 600 since we aren't doing as much to setup the printk. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- include/net/dst.h | 7 +------ net/core/dst.c | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/net/dst.h b/include/net/dst.h index c71ab7e26020..16da04466554 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -142,16 +142,11 @@ struct dst_entry * dst_clone(struct dst_entry * dst) 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(dst_underflow_bug_msg, - atomic_read(&dst->__refcnt), - dst, current_text_addr()); + WARN_ON(atomic_read(&dst->__refcnt) < 1); atomic_dec(&dst->__refcnt); } } diff --git a/net/core/dst.c b/net/core/dst.c index 9f14ae8a7673..42aeae5959f5 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -19,8 +19,6 @@ #include -const char dst_underflow_bug_msg[] = KERN_DEBUG "BUG: dst underflow %d: %p at %p\n"; - /* Locking strategy: * 1) Garbage collection state of dead destination cache * entries is protected by dst_lock. @@ -275,7 +273,6 @@ void __init dst_init(void) register_netdevice_notifier(&dst_dev_notifier); } -EXPORT_SYMBOL(dst_underflow_bug_msg); EXPORT_SYMBOL(__dst_free); EXPORT_SYMBOL(dst_alloc); EXPORT_SYMBOL(dst_destroy); -- 2.39.5