aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/extent_cache.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-07-15 17:29:49 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-08-05 08:08:06 -0700
commit727edac572034557d207b293a47de25145e3d58c (patch)
tree984e7ceae8a02605c0626375f26abab96126c440 /fs/f2fs/extent_cache.c
parentf2fs: stat inline xattr inode number (diff)
downloadlinux-dev-727edac572034557d207b293a47de25145e3d58c.tar.xz
linux-dev-727edac572034557d207b293a47de25145e3d58c.zip
f2fs: use atomic_t to record hit ratio info of extent cache
Variables for recording extent cache ratio info were updated without protection, this patch tries to alter them to atomic_t type for more accurate stat. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/extent_cache.c')
-rw-r--r--fs/f2fs/extent_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index 5f78fc1e818a..362df8cd54d4 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -279,7 +279,7 @@ static bool f2fs_lookup_extent_tree(struct inode *inode, pgoff_t pgofs,
et->largest.fofs + et->largest.len > pgofs) {
*ei = et->largest;
ret = true;
- stat_inc_read_hit(sbi->sb);
+ stat_inc_read_hit(sbi);
goto out;
}
@@ -292,10 +292,10 @@ static bool f2fs_lookup_extent_tree(struct inode *inode, pgoff_t pgofs,
et->cached_en = en;
spin_unlock(&sbi->extent_lock);
ret = true;
- stat_inc_read_hit(sbi->sb);
+ stat_inc_read_hit(sbi);
}
out:
- stat_inc_total_hit(sbi->sb);
+ stat_inc_total_hit(sbi);
read_unlock(&et->lock);
trace_f2fs_lookup_extent_tree_end(inode, pgofs, ei);