aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/rdma.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-03-11 08:50:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-03-17 00:17:01 -0400
commit561c7df63e259203515509a7ad075382a42bff0c (patch)
tree80d3d382ba155d4bced37b716dcac0e31062f2c5 /net/rds/rdma.c
parent450d06c0208ad195ccd74a7edd11321e316791ad (diff)
RDS: Do not call set_page_dirty() with irqs off
set_page_dirty() unconditionally re-enables interrupts, so if we call it with irqs off, they will be on after the call, and that's bad. This patch moves the call after we've re-enabled interrupts in send_drop_to(), so it's safe. Also, add BUG_ONs to let us know if we ever do call set_page_dirty with interrupts off. Signed-off-by: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/rdma.c')
-rw-r--r--net/rds/rdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 4c64daa1f5d5..61b359d9dffd 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -438,8 +438,10 @@ void rds_rdma_free_op(struct rds_rdma_op *ro)
438 /* Mark page dirty if it was possibly modified, which 438 /* Mark page dirty if it was possibly modified, which
439 * is the case for a RDMA_READ which copies from remote 439 * is the case for a RDMA_READ which copies from remote
440 * to local memory */ 440 * to local memory */
441 if (!ro->r_write) 441 if (!ro->r_write) {
442 BUG_ON(in_interrupt());
442 set_page_dirty(page); 443 set_page_dirty(page);
444 }
443 put_page(page); 445 put_page(page);
444 } 446 }
445 447