From: Yongpeng Yang Date: Sat, 27 Dec 2025 09:19:06 +0000 (+0800) Subject: f2fs: clean up the force parameter in __submit_merged_write_cond() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86c1cf0578c59c8e68185d86d03be846bcaef0e2;p=thirdparty%2Fkernel%2Fstable.git f2fs: clean up the force parameter in __submit_merged_write_cond() The force parameter in __submit_merged_write_cond is redundant, where `force == true` implies `inode == NULL && folio == NULL && ino == 0` is true, and `force == false` implies `inode != NULL || folio != NULL || ino != 0` is true. Thus, this patch replaces the force parameter with a stack variable force. Signed-off-by: Yongpeng Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 12bf4b6e0075..d4ef26beadbc 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -664,10 +664,11 @@ unlock_out: static void __submit_merged_write_cond(struct f2fs_sb_info *sbi, struct inode *inode, struct folio *folio, - nid_t ino, enum page_type type, bool force) + nid_t ino, enum page_type type) { enum temp_type temp; bool ret = true; + bool force = !inode && !folio && !ino; for (temp = HOT; temp < NR_TEMP_TYPE; temp++) { if (!force) { @@ -689,14 +690,14 @@ static void __submit_merged_write_cond(struct f2fs_sb_info *sbi, void f2fs_submit_merged_write(struct f2fs_sb_info *sbi, enum page_type type) { - __submit_merged_write_cond(sbi, NULL, NULL, 0, type, true); + __submit_merged_write_cond(sbi, NULL, NULL, 0, type); } void f2fs_submit_merged_write_cond(struct f2fs_sb_info *sbi, struct inode *inode, struct folio *folio, nid_t ino, enum page_type type) { - __submit_merged_write_cond(sbi, inode, folio, ino, type, false); + __submit_merged_write_cond(sbi, inode, folio, ino, type); } void f2fs_flush_merged_writes(struct f2fs_sb_info *sbi)