diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-02-07 02:00:06 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-02-17 06:58:53 +0100 |
commit | 1fe54f9dd3acfaa3ed4e1d1e3278fd0f1d1e98cd (patch) | |
tree | 3b2859ffd3db7678bf7a284344ab12d3cfa3210a /fs/f2fs/f2fs.h | |
parent | f2fs: fix f2fs_write_meta_page at no checkpoint status (diff) | |
download | linux-1fe54f9dd3acfaa3ed4e1d1e3278fd0f1d1e98cd.tar.xz linux-1fe54f9dd3acfaa3ed4e1d1e3278fd0f1d1e98cd.zip |
f2fs: clean up redundant function call
This patch integrates inode_[inc|dec]_dirty_dents with inc_page_count to remove
redundant calls.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index aeff1327f9ed..4841d1225ea0 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -662,6 +662,7 @@ static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type) static inline void inode_inc_dirty_dents(struct inode *inode) { + inc_page_count(F2FS_SB(inode->i_sb), F2FS_DIRTY_DENTS); atomic_inc(&F2FS_I(inode)->dirty_dents); } @@ -672,6 +673,10 @@ static inline void dec_page_count(struct f2fs_sb_info *sbi, int count_type) static inline void inode_dec_dirty_dents(struct inode *inode) { + if (!S_ISDIR(inode->i_mode)) + return; + + dec_page_count(F2FS_SB(inode->i_sb), F2FS_DIRTY_DENTS); atomic_dec(&F2FS_I(inode)->dirty_dents); } |