diff options
| author | Chao Yu <yuchao0@huawei.com> | 2016-10-11 22:57:01 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:34:15 +0200 |
| commit | ab9b10421e8f2ad6ac5986c8219d57dd4b2526e0 (patch) | |
| tree | b35ac112ed9db0a0e2bdce1ade8b75dcae1270e6 /fs/f2fs/inline.c | |
| parent | a3ecc330b58ca6f0d50e027c4d3125251f89bda8 (diff) | |
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/inline.c')
| -rw-r--r-- | fs/f2fs/inline.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 6d00d9b1a..44d92fc6e 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -136,8 +136,10 @@ int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page) fio.old_blkaddr = dn->data_blkaddr; write_data_page(dn, &fio); f2fs_wait_on_page_writeback(page, DATA, true); - if (dirty) + if (dirty) { inode_dec_dirty_pages(dn->inode); + remove_dirty_inode(dn->inode); + } /* this converted inline_data should be recovered. */ set_inode_flag(dn->inode, FI_APPEND_WRITE); |
