mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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:
committed by
Jens Axboe
parent
3175199ab0
commit
c6bf3f0e25
@@ -825,7 +825,7 @@ start_journal_io:
|
||||
if (commit_transaction->t_need_data_flush &&
|
||||
(journal->j_fs_dev != journal->j_dev) &&
|
||||
(journal->j_flags & JBD2_BARRIER))
|
||||
blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS);
|
||||
blkdev_issue_flush(journal->j_fs_dev);
|
||||
|
||||
/* Done it all: now write the commit record asynchronously. */
|
||||
if (jbd2_has_feature_async_commit(journal)) {
|
||||
@@ -932,7 +932,7 @@ start_journal_io:
|
||||
stats.run.rs_blocks_logged++;
|
||||
if (jbd2_has_feature_async_commit(journal) &&
|
||||
journal->j_flags & JBD2_BARRIER) {
|
||||
blkdev_issue_flush(journal->j_dev, GFP_NOFS);
|
||||
blkdev_issue_flush(journal->j_dev);
|
||||
}
|
||||
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user