summaryrefslogtreecommitdiffstats
path: root/net/rds/message.c
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2013-03-03 21:57:18 +0100
committerDavid S. Miller <davem@davemloft.net>2013-03-04 20:12:07 +0100
commit7dac1b514a00817ddb43704068c14ffd8b8fba19 (patch)
tree2d526dced6203f4443c4009616f90188c7364594 /net/rds/message.c
parentnet: fec: fix build error in no MXC platform (diff)
downloadlinux-7dac1b514a00817ddb43704068c14ffd8b8fba19.tar.xz
linux-7dac1b514a00817ddb43704068c14ffd8b8fba19.zip
rds: simplify a warning message
Cc: David S. Miller <davem@davemloft.net> Cc: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/rds/message.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/rds/message.c b/net/rds/message.c
index aff589cc022e..aba232f9f308 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -82,10 +82,7 @@ static void rds_message_purge(struct rds_message *rm)
void rds_message_put(struct rds_message *rm)
{
rdsdebug("put rm %p ref %d\n", rm, atomic_read(&rm->m_refcount));
- if (atomic_read(&rm->m_refcount) == 0) {
-printk(KERN_CRIT "danger refcount zero on %p\n", rm);
-WARN_ON(1);
- }
+ WARN(!atomic_read(&rm->m_refcount), "danger refcount zero on %p\n", rm);
if (atomic_dec_and_test(&rm->m_refcount)) {
BUG_ON(!list_empty(&rm->m_sock_item));
BUG_ON(!list_empty(&rm->m_conn_item));