summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/shrinker.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-12-22 04:25:50 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2015-12-30 19:13:00 +0100
commit74fd8d9927ef08db30a85f131a124152aeba66c7 (patch)
tree7d9acc9ac7ea5196baa96de29fc18a0903299aec /fs/f2fs/shrinker.c
parentf2fs: use atomic variable for total_extent_tree (diff)
downloadlinux-74fd8d9927ef08db30a85f131a124152aeba66c7.tar.xz
linux-74fd8d9927ef08db30a85f131a124152aeba66c7.zip
f2fs: speed up shrinking extent tree entries
If there is no candidates for shrinking slab entries, we don't need to traverse any trees at all. Reviewed-by: Chao Yu <chao2.yu@samsung.com> [Jaegeuk Kim: fix missing initialization reported by Yunlei He] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r--fs/f2fs/shrinker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/shrinker.c b/fs/f2fs/shrinker.c
index a11e099cbddc..93606f281bf9 100644
--- a/fs/f2fs/shrinker.c
+++ b/fs/f2fs/shrinker.c
@@ -32,7 +32,7 @@ static unsigned long __count_free_nids(struct f2fs_sb_info *sbi)
static unsigned long __count_extent_cache(struct f2fs_sb_info *sbi)
{
- return atomic_read(&sbi->total_ext_tree) +
+ return atomic_read(&sbi->total_zombie_tree) +
atomic_read(&sbi->total_ext_node);
}