RDS: Fix BUG_ONs to not fire when in a tasklet
authorAndy Grover <andy.grover@oracle.com>
Sat, 13 Mar 2010 00:22:32 +0000 (16:22 -0800)
committerAndy Grover <andy.grover@oracle.com>
Thu, 9 Sep 2010 01:07:31 +0000 (18:07 -0700)
in_interrupt() is true in softirqs. The BUG_ONs are supposed
to check for if irqs are disabled, so we should use
BUG_ON(irqs_disabled()) instead, duh.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
net/rds/ib_rdma.c
net/rds/rdma.c

index a54cd63f9e35bd0f3e33a80d9ac06801fb3e0122..a92aebcb7fcf872e712189a9dbe1d66bd0df47c0 100644 (file)
@@ -441,7 +441,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(in_interrupt());
+                       BUG_ON(irqs_disabled());
                        set_page_dirty(page);
                        put_page(page);
                }
index 75fd13bb631bbc06bf8493c06c266951b6e47c95..3b442d4d64cf2cff64f6675358da8cae4f6425a1 100644 (file)
@@ -440,7 +440,7 @@ void rds_rdma_free_op(struct rds_rdma_op *ro)
                 * is the case for a RDMA_READ which copies from remote
                 * to local memory */
                if (!ro->r_write) {
-                       BUG_ON(in_interrupt());
+                       BUG_ON(irqs_disabled());
                        set_page_dirty(page);
                }
                put_page(page);