mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
f2fs: avoid unnecessary shrink in f2fs_shrink_scan()
In f2fs_shrink_scan(), let's check if we have already shrinked enough number of memory before calling f2fs_shrink_read_extent_tree(). Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
026d7aeadf
commit
7173538c41
|
|
@ -109,7 +109,8 @@ unsigned long f2fs_shrink_scan(struct shrinker *shrink,
|
|||
freed += f2fs_shrink_age_extent_tree(sbi, nr >> 2);
|
||||
|
||||
/* shrink read extent cache entries */
|
||||
freed += f2fs_shrink_read_extent_tree(sbi, nr >> 2);
|
||||
if (freed < nr)
|
||||
freed += f2fs_shrink_read_extent_tree(sbi, nr >> 2);
|
||||
|
||||
/* shrink clean nat cache entries */
|
||||
if (freed < nr)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user