RDS: Fix assertion level from fatal to warning
authorsantosh.shilimkar@oracle.com <santosh.shilimkar@oracle.com>
Sat, 22 Aug 2015 22:45:31 +0000 (15:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Aug 2015 20:35:31 +0000 (13:35 -0700)
Fix the asserion level since its not fatal and can be hit
in normal execution paths. There is no need to take the
system down.

We keep the WARN_ON() to detect the condition if we get
here with bad pages.

Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib_rdma.c
net/rds/rdma.c

index e49c9568b4a5c52d4e9b38d71756e3f782429c6f..7b7aac8cdb560904bdf7140c156d29479e83a6f9 100644 (file)
@@ -490,7 +490,7 @@ static void __rds_ib_teardown_mr(struct rds_ib_mr *ibmr)
 
                        /* FIXME we need a way to tell a r/w MR
                         * from a r/o MR */
-                       BUG_ON(irqs_disabled());
+                       WARN_ON(!page->mapping && irqs_disabled());
                        set_page_dirty(page);
                        put_page(page);
                }
index 6401b501a215bc41a145c0c491a6217846212f42..c1df9b1cf3b258eaaf616cbc7d7745a4f9404382 100644 (file)
@@ -451,7 +451,7 @@ void rds_rdma_free_op(struct rm_rdma_op *ro)
                 * is the case for a RDMA_READ which copies from remote
                 * to local memory */
                if (!ro->op_write) {
-                       BUG_ON(irqs_disabled());
+                       WARN_ON(!page->mapping && irqs_disabled());
                        set_page_dirty(page);
                }
                put_page(page);