diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-07-15 12:29:49 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-08-05 18:08:06 +0300 |
commit | 727edac572034557d207b293a47de25145e3d58c (patch) | |
tree | 984e7ceae8a02605c0626375f26abab96126c440 /fs/f2fs/extent_cache.c | |
parent | d5e8f6c9800c382cc55d8df801775d51311f8f21 (diff) | |
download | linux-727edac572034557d207b293a47de25145e3d58c.tar.xz |
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.c | 6 |
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); |