diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-07-26 00:43:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-26 00:43:18 -0400 |
commit | 547b792cac0a038b9dbf958d3c120df3740b5572 (patch) | |
tree | 08554d083b0ca7d65739dc1ce12f9b12a9b8e1f8 /net/core/stream.c | |
parent | 53e5e96ec18da6f65e89f05674711e1c93d8df67 (diff) |
net: convert BUG_TRAP to generic WARN_ON
Removes legacy reinvent-the-wheel type thing. The generic
machinery integrates much better to automated debugging aids
such as kerneloops.org (and others), and is unambiguous due to
better naming. Non-intuively BUG_TRAP() is actually equal to
WARN_ON() rather than BUG_ON() though some might actually be
promoted to BUG_ON() but I left that to future.
I could make at least one BUILD_BUG_ON conversion.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/stream.c')
-rw-r--r-- | net/core/stream.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/stream.c b/net/core/stream.c index 4a0ad152c9c4..a6b3437ff082 100644 --- a/net/core/stream.c +++ b/net/core/stream.c | |||
@@ -192,13 +192,13 @@ void sk_stream_kill_queues(struct sock *sk) | |||
192 | __skb_queue_purge(&sk->sk_error_queue); | 192 | __skb_queue_purge(&sk->sk_error_queue); |
193 | 193 | ||
194 | /* Next, the write queue. */ | 194 | /* Next, the write queue. */ |
195 | BUG_TRAP(skb_queue_empty(&sk->sk_write_queue)); | 195 | WARN_ON(!skb_queue_empty(&sk->sk_write_queue)); |
196 | 196 | ||
197 | /* Account for returned memory. */ | 197 | /* Account for returned memory. */ |
198 | sk_mem_reclaim(sk); | 198 | sk_mem_reclaim(sk); |
199 | 199 | ||
200 | BUG_TRAP(!sk->sk_wmem_queued); | 200 | WARN_ON(sk->sk_wmem_queued); |
201 | BUG_TRAP(!sk->sk_forward_alloc); | 201 | WARN_ON(sk->sk_forward_alloc); |
202 | 202 | ||
203 | /* It is _impossible_ for the backlog to contain anything | 203 | /* It is _impossible_ for the backlog to contain anything |
204 | * when we get here. All user references to this socket | 204 | * when we get here. All user references to this socket |