aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-04-15 09:20:10 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-04-15 09:20:10 -0400
commit88b996cd0652280cc9b9fc70008fda15f14175e1 (patch)
treec842575e47ab094bced8a01b241568616e89366a /include/linux/blkdev.h
parent80656b67b3988f83edd86a280d9937124fe62050 (diff)
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 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index c07ffafac5d4..ffe48ff318f9 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -865,14 +865,14 @@ struct blk_plug {
865 865
866extern void blk_start_plug(struct blk_plug *); 866extern void blk_start_plug(struct blk_plug *);
867extern void blk_finish_plug(struct blk_plug *); 867extern void blk_finish_plug(struct blk_plug *);
868extern void __blk_flush_plug(struct task_struct *, struct blk_plug *); 868extern void blk_flush_plug_list(struct blk_plug *);
869 869
870static inline void blk_flush_plug(struct task_struct *tsk) 870static inline void blk_flush_plug(struct task_struct *tsk)
871{ 871{
872 struct blk_plug *plug = tsk->plug; 872 struct blk_plug *plug = tsk->plug;
873 873
874 if (unlikely(plug)) 874 if (plug)
875 __blk_flush_plug(tsk, plug); 875 blk_flush_plug_list(plug);
876} 876}
877 877
878static inline bool blk_needs_flush_plug(struct task_struct *tsk) 878static inline bool blk_needs_flush_plug(struct task_struct *tsk)