aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>2011-01-13 15:00:00 -0500
committerAlasdair G Kergon <agk@redhat.com>2011-01-13 15:00:00 -0500
commit052189a2ec956810feefb6a681416c5e6a207646 (patch)
tree52a1fbec2878788c6a2f6565999b97331493bc4c /drivers/md/dm.c
parentdbc883f1570d992ba926a8c9e22140ba473c6cc1 (diff)
dm: remove superfluous irq disablement in dm_request_fn
This patch changes spin_lock_irq() to spin_lock() in dm_request_fn(). This patch is just a clean-up and no functional change. The spin_lock_irq() was leftover from the early request-based dm code, where map_request() used to enable interrupts. Since current map_request() never enables interrupts, we can change it to spin_lock() to match the prior spin_unlock(). Auditing through the dm and block-layer code called from map_request(), I confirmed all functions save/restore interrupt status, so no function returning with interrupts enabled. Also I haven't observed any problem on my test environment which uses scsi and lpfc driver after heavy I/O testing with occasional path down/up. Added BUG_ON() to detect breakage in future. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index e504bb40d60e..eaa3af0e0632 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1637,13 +1637,15 @@ static void dm_request_fn(struct request_queue *q)
1637 if (map_request(ti, clone, md)) 1637 if (map_request(ti, clone, md))
1638 goto requeued; 1638 goto requeued;
1639 1639
1640 spin_lock_irq(q->queue_lock); 1640 BUG_ON(!irqs_disabled());
1641 spin_lock(q->queue_lock);
1641 } 1642 }
1642 1643
1643 goto out; 1644 goto out;
1644 1645
1645requeued: 1646requeued:
1646 spin_lock_irq(q->queue_lock); 1647 BUG_ON(!irqs_disabled());
1648 spin_lock(q->queue_lock);
1647 1649
1648plug_and_out: 1650plug_and_out:
1649 if (!elv_queue_empty(q)) 1651 if (!elv_queue_empty(q))