diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-02-07 10:00:06 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-02-17 14:58:53 +0900 |
commit | 1fe54f9dd3acfaa3ed4e1d1e3278fd0f1d1e98cd (patch) | |
tree | 3b2859ffd3db7678bf7a284344ab12d3cfa3210a /fs/f2fs/data.c | |
parent | 203681f65b07055259bd475a6281136615b4e9a4 (diff) | |
download | op-kernel-dev-1fe54f9dd3acfaa3ed4e1d1e3278fd0f1d1e98cd.zip op-kernel-dev-1fe54f9dd3acfaa3ed4e1d1e3278fd0f1d1e98cd.tar.gz |
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/data.c')
-rw-r--r-- | fs/f2fs/data.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index d175ae3..b401be7 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -799,10 +799,7 @@ static int f2fs_write_data_page(struct page *page, */ offset = i_size & (PAGE_CACHE_SIZE - 1); if ((page->index >= end_index + 1) || !offset) { - if (S_ISDIR(inode->i_mode)) { - dec_page_count(sbi, F2FS_DIRTY_DENTS); - inode_dec_dirty_dents(inode); - } + inode_dec_dirty_dents(inode); goto out; } @@ -815,7 +812,6 @@ write: /* Dentry blocks are controlled by checkpoint */ if (S_ISDIR(inode->i_mode)) { - dec_page_count(sbi, F2FS_DIRTY_DENTS); inode_dec_dirty_dents(inode); err = do_write_data_page(page, &fio); } else { @@ -1033,11 +1029,8 @@ static void f2fs_invalidate_data_page(struct page *page, unsigned int offset, unsigned int length) { struct inode *inode = page->mapping->host; - struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); - if (S_ISDIR(inode->i_mode) && PageDirty(page)) { - dec_page_count(sbi, F2FS_DIRTY_DENTS); + if (PageDirty(page)) inode_dec_dirty_dents(inode); - } ClearPagePrivate(page); } |