mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
f2fs: fix wrong condition to trigger background checkpoint correctly
[ Upstream commitcd6d697a6e
] In f2fs_balance_fs_bg(), it needs to check both NAT_ENTRIES and INO_ENTRIES memory usage to decide whether we should skip background checkpoint, otherwise we may always skip checking INO_ENTRIES memory usage, so that INO_ENTRIES may potentially cause high memory footprint. Fixes:493720a485
("f2fs: fix to avoid REQ_TIME and CP_TIME collision") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a50aad0468
commit
84ceef38cd
1 changed files with 1 additions and 1 deletions
|
@ -561,7 +561,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi, bool from_bg)
|
|||
goto do_sync;
|
||||
|
||||
/* checkpoint is the only way to shrink partial cached entries */
|
||||
if (f2fs_available_free_memory(sbi, NAT_ENTRIES) ||
|
||||
if (f2fs_available_free_memory(sbi, NAT_ENTRIES) &&
|
||||
f2fs_available_free_memory(sbi, INO_ENTRIES))
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue