aboutsummaryrefslogtreecommitdiffstats
path: root/block/ll_rw_blk.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r--block/ll_rw_blk.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 3d489915fd22..3b927be03850 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1621,15 +1621,7 @@ static void blk_backing_dev_unplug(struct backing_dev_info *bdi,
1621{ 1621{
1622 struct request_queue *q = bdi->unplug_io_data; 1622 struct request_queue *q = bdi->unplug_io_data;
1623 1623
1624 /* 1624 blk_unplug(q);
1625 * devices don't necessarily have an ->unplug_fn defined
1626 */
1627 if (q->unplug_fn) {
1628 blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL,
1629 q->rq.count[READ] + q->rq.count[WRITE]);
1630
1631 q->unplug_fn(q);
1632 }
1633} 1625}
1634 1626
1635static void blk_unplug_work(struct work_struct *work) 1627static void blk_unplug_work(struct work_struct *work)
@@ -1653,6 +1645,20 @@ static void blk_unplug_timeout(unsigned long data)
1653 kblockd_schedule_work(&q->unplug_work); 1645 kblockd_schedule_work(&q->unplug_work);
1654} 1646}
1655 1647
1648void blk_unplug(struct request_queue *q)
1649{
1650 /*
1651 * devices don't necessarily have an ->unplug_fn defined
1652 */
1653 if (q->unplug_fn) {
1654 blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL,
1655 q->rq.count[READ] + q->rq.count[WRITE]);
1656
1657 q->unplug_fn(q);
1658 }
1659}
1660EXPORT_SYMBOL(blk_unplug);
1661
1656/** 1662/**
1657 * blk_start_queue - restart a previously stopped queue 1663 * blk_start_queue - restart a previously stopped queue
1658 * @q: The &struct request_queue in question 1664 * @q: The &struct request_queue in question