You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user