mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
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 <yangyongpeng@xiaomi.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
761dac9073
commit
86c1cf0578
|
|
@ -664,10 +664,11 @@ static void __f2fs_submit_merged_write(struct f2fs_sb_info *sbi,
|
|||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user