aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 36b1a7559f94..b598fa7720d4 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2671,7 +2671,7 @@ static void queue_unplugged(struct request_queue *q, unsigned int depth)
2671 q->unplugged_fn(q); 2671 q->unplugged_fn(q);
2672} 2672}
2673 2673
2674static void flush_plug_list(struct blk_plug *plug) 2674void blk_flush_plug_list(struct blk_plug *plug)
2675{ 2675{
2676 struct request_queue *q; 2676 struct request_queue *q;
2677 unsigned long flags; 2677 unsigned long flags;
@@ -2733,28 +2733,16 @@ static void flush_plug_list(struct blk_plug *plug)
2733 2733
2734 local_irq_restore(flags); 2734 local_irq_restore(flags);
2735} 2735}
2736 2736EXPORT_SYMBOL(blk_flush_plug_list);
2737static void __blk_finish_plug(struct task_struct *tsk, struct blk_plug *plug)
2738{
2739 flush_plug_list(plug);
2740
2741 if (plug == tsk->plug)
2742 tsk->plug = NULL;
2743}
2744 2737
2745void blk_finish_plug(struct blk_plug *plug) 2738void blk_finish_plug(struct blk_plug *plug)
2746{ 2739{
2747 if (plug) 2740 blk_flush_plug_list(plug);
2748 __blk_finish_plug(current, plug);
2749}
2750EXPORT_SYMBOL(blk_finish_plug);
2751 2741
2752void __blk_flush_plug(struct task_struct *tsk, struct blk_plug *plug) 2742 if (plug == current->plug)
2753{ 2743 current->plug = NULL;
2754 __blk_finish_plug(tsk, plug);
2755 tsk->plug = plug;
2756} 2744}
2757EXPORT_SYMBOL(__blk_flush_plug); 2745EXPORT_SYMBOL(blk_finish_plug);
2758 2746
2759int __init blk_dev_init(void) 2747int __init blk_dev_init(void)
2760{ 2748{