block: use an on-stack bio in blkdev_issue_flush

There is no point in allocating memory for a synchronous flush.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Acked-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig
2021-01-26 15:52:35 +01:00
committed by Jens Axboe
parent 3175199ab0
commit c6bf3f0e25
23 changed files with 33 additions and 38 deletions

View File

@@ -1288,7 +1288,7 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk)
!list_empty(&plug->cb_list));
}
int blkdev_issue_flush(struct block_device *, gfp_t);
int blkdev_issue_flush(struct block_device *bdev);
long nr_blockdev_pages(void);
#else /* CONFIG_BLOCK */
struct blk_plug {
@@ -1316,7 +1316,7 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk)
return false;
}
static inline int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask)
static inline int blkdev_issue_flush(struct block_device *bdev)
{
return 0;
}