aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-04-15 15:20:10 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-04-15 15:20:10 +0200
commit88b996cd0652280cc9b9fc70008fda15f14175e1 (patch)
treec842575e47ab094bced8a01b241568616e89366a /block
parent80656b67b3988f83edd86a280d9937124fe62050 (diff)
downloadkernel_samsung_aries-88b996cd0652280cc9b9fc70008fda15f14175e1.zip
kernel_samsung_aries-88b996cd0652280cc9b9fc70008fda15f14175e1.tar.gz
kernel_samsung_aries-88b996cd0652280cc9b9fc70008fda15f14175e1.tar.bz2
block: cleanup the block plug helper functions
It's a bit of a mess currently. task->plug is being cleared and reset in __blk_finish_plug(), and blk_finish_plug() is testing for a NULL plug which cannot happen even from schedule() anymore since it uses blk_needs_flush_plug() to determine whether to call into this function at all. So get rid of some of the cruft. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
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 36b1a75..b598fa7 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)
q->unplugged_fn(q);
}
-static void flush_plug_list(struct blk_plug *plug)
+void blk_flush_plug_list(struct blk_plug *plug)
{
struct request_queue *q;
unsigned long flags;
@@ -2733,28 +2733,16 @@ static void flush_plug_list(struct blk_plug *plug)
local_irq_restore(flags);
}
-
-static void __blk_finish_plug(struct task_struct *tsk, struct blk_plug *plug)
-{
- flush_plug_list(plug);
-
- if (plug == tsk->plug)
- tsk->plug = NULL;
-}
+EXPORT_SYMBOL(blk_flush_plug_list);
void blk_finish_plug(struct blk_plug *plug)
{
- if (plug)
- __blk_finish_plug(current, plug);
-}
-EXPORT_SYMBOL(blk_finish_plug);
+ blk_flush_plug_list(plug);
-void __blk_flush_plug(struct task_struct *tsk, struct blk_plug *plug)
-{
- __blk_finish_plug(tsk, plug);
- tsk->plug = plug;
+ if (plug == current->plug)
+ current->plug = NULL;
}
-EXPORT_SYMBOL(__blk_flush_plug);
+EXPORT_SYMBOL(blk_finish_plug);
int __init blk_dev_init(void)
{