diff options
author | Chao Yu <yuchao0@huawei.com> | 2016-10-11 16:57:01 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-11-23 21:10:51 +0100 |
commit | 933439c8f3474e329709b715b43b0b8168bbecf8 (patch) | |
tree | e2048039efe1839eb93849ae8fd012d1c30591c7 /fs/f2fs/segment.c | |
parent | f2fs: fix to release discard entries during checkpoint (diff) | |
download | linux-933439c8f3474e329709b715b43b0b8168bbecf8.tar.xz linux-933439c8f3474e329709b715b43b0b8168bbecf8.zip |
f2fs: give a chance to detach from dirty list
If there is no dirty pages in inode, we should give a chance to detach
the inode from global dirty list, otherwise it needs to call another
unnecessary .writepages for detaching.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index fc886f008449..f7e73b2afe68 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -274,8 +274,10 @@ static int __commit_inmem_pages(struct inode *inode, set_page_dirty(page); f2fs_wait_on_page_writeback(page, DATA, true); - if (clear_page_dirty_for_io(page)) + if (clear_page_dirty_for_io(page)) { inode_dec_dirty_pages(inode); + remove_dirty_inode(inode); + } fio.page = page; err = do_write_data_page(&fio); |