aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index ec0357d8c4a5..f3f7879391a7 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -860,8 +860,13 @@ extern void blk_put_queue(struct request_queue *);
860struct blk_plug { 860struct blk_plug {
861 unsigned long magic; 861 unsigned long magic;
862 struct list_head list; 862 struct list_head list;
863 struct list_head cb_list;
863 unsigned int should_sort; 864 unsigned int should_sort;
864}; 865};
866struct blk_plug_cb {
867 struct list_head list;
868 void (*callback)(struct blk_plug_cb *);
869};
865 870
866extern void blk_start_plug(struct blk_plug *); 871extern void blk_start_plug(struct blk_plug *);
867extern void blk_finish_plug(struct blk_plug *); 872extern void blk_finish_plug(struct blk_plug *);
@@ -887,7 +892,7 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk)
887{ 892{
888 struct blk_plug *plug = tsk->plug; 893 struct blk_plug *plug = tsk->plug;
889 894
890 return plug && !list_empty(&plug->list); 895 return plug && (!list_empty(&plug->list) || !list_empty(&plug->cb_list));
891} 896}
892 897
893/* 898/*