aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-flush.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-flush.c')
-rw-r--r--block/blk-flush.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c
index c8e25768f2e1..55028a707927 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -472,7 +472,16 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
472} 472}
473EXPORT_SYMBOL(blkdev_issue_flush); 473EXPORT_SYMBOL(blkdev_issue_flush);
474 474
475void blk_mq_init_flush(struct request_queue *q) 475int blk_mq_init_flush(struct request_queue *q)
476{ 476{
477 struct blk_mq_tag_set *set = q->tag_set;
478
477 spin_lock_init(&q->mq_flush_lock); 479 spin_lock_init(&q->mq_flush_lock);
480
481 q->flush_rq = kzalloc(round_up(sizeof(struct request) +
482 set->cmd_size, cache_line_size()),
483 GFP_KERNEL);
484 if (!q->flush_rq)
485 return -ENOMEM;
486 return 0;
478} 487}