aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2022-01-27 07:05:49 +0000
committerJens Axboe <[email protected]>2022-02-02 14:50:00 +0000
commitaa8dcccaf32bfdc09f2aff089d5d60c37da5b7b5 (patch)
tree47905396b491e167950ec5c95d1d2bdeb3c72e6e /fs/fs-writeback.c
parentblock: remove blk_needs_flush_plug (diff)
downloadkernel-aa8dcccaf32bfdc09f2aff089d5d60c37da5b7b5.tar.gz
kernel-aa8dcccaf32bfdc09f2aff089d5d60c37da5b7b5.zip
block: check that there is a plug in blk_flush_plug
Rename blk_flush_plug to __blk_flush_plug and add a wrapper that includes the NULL check instead of open coding that check everywhere. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index f4ce38f6fc31..33d54c9fbefc 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1903,8 +1903,7 @@ static long writeback_sb_inodes(struct super_block *sb,
* unplug, so get our IOs out the door before we
* give up the CPU.
*/
- if (current->plug)
- blk_flush_plug(current->plug, false);
+ blk_flush_plug(current->plug, false);
cond_resched();
}
@@ -2301,8 +2300,7 @@ void wakeup_flusher_threads(enum wb_reason reason)
/*
* If we are expecting writeback progress we must submit plugged IO.
*/
- if (current->plug)
- blk_flush_plug(current->plug, true);
+ blk_flush_plug(current->plug, true);
rcu_read_lock();
list_for_each_entry_rcu(bdi, &bdi_list, bdi_list)