diff options
author | Christoph Hellwig <hch@lst.de> | 2021-10-20 16:41:19 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-20 17:56:11 +0200 |
commit | 008f75a20e7072d0840ec323c39b42206f3fa8a0 (patch) | |
tree | f5e446c0d7e9024e7eb1be8e57fb842663f91c41 /fs/fs-writeback.c | |
parent | block: optimise blk_flush_plug_list (diff) | |
download | linux-008f75a20e7072d0840ec323c39b42206f3fa8a0.tar.xz linux-008f75a20e7072d0840ec323c39b42206f3fa8a0.zip |
block: cleanup the flush plug helpers
Consolidate the various helpers into a single blk_flush_plug helper that
takes a plk_plug and the from_scheduler bool and switch all callsites to
call it directly. Checks that the plug is non-NULL must be performed by
the caller, something that most already do anyway.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211020144119.142582-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 81ec192ce067..4124a89a1a5d 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1893,7 +1893,8 @@ static long writeback_sb_inodes(struct super_block *sb, * unplug, so get our IOs out the door before we * give up the CPU. */ - blk_flush_plug(current); + if (current->plug) + blk_flush_plug(current->plug, false); cond_resched(); } @@ -2291,7 +2292,7 @@ void wakeup_flusher_threads(enum wb_reason reason) * If we are expecting writeback progress we must submit plugged IO. */ if (blk_needs_flush_plug(current)) - blk_schedule_flush_plug(current); + blk_flush_plug(current->plug, true); rcu_read_lock(); list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) |