summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/shrinker.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-12-22 04:20:15 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2015-12-22 19:31:41 +0100
commit7441ccef339f87abc27afc4ccfc24c014d7360c9 (patch)
tree6f1abef9d8a0841a14f12d78d577dd988304513f /fs/f2fs/shrinker.c
parentf2fs: add a tracepoint for sync_dirty_inodes (diff)
downloadlinux-7441ccef339f87abc27afc4ccfc24c014d7360c9.tar.xz
linux-7441ccef339f87abc27afc4ccfc24c014d7360c9.zip
f2fs: use atomic variable for total_extent_tree
It would be better to use atomic variable for total_extent_tree. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/shrinker.c')
-rw-r--r--fs/f2fs/shrinker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/shrinker.c b/fs/f2fs/shrinker.c
index da0d8e0b55a5..a11e099cbddc 100644
--- a/fs/f2fs/shrinker.c
+++ b/fs/f2fs/shrinker.c
@@ -32,7 +32,8 @@ static unsigned long __count_free_nids(struct f2fs_sb_info *sbi)
static unsigned long __count_extent_cache(struct f2fs_sb_info *sbi)
{
- return sbi->total_ext_tree + atomic_read(&sbi->total_ext_node);
+ return atomic_read(&sbi->total_ext_tree) +
+ atomic_read(&sbi->total_ext_node);
}
unsigned long f2fs_shrink_count(struct shrinker *shrink,