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>
This commit is contained in:
@@ -1785,12 +1785,14 @@ void f2fs_invalidate_page(struct page *page, unsigned int offset,
|
||||
return;
|
||||
|
||||
if (PageDirty(page)) {
|
||||
if (inode->i_ino == F2FS_META_INO(sbi))
|
||||
if (inode->i_ino == F2FS_META_INO(sbi)) {
|
||||
dec_page_count(sbi, F2FS_DIRTY_META);
|
||||
else if (inode->i_ino == F2FS_NODE_INO(sbi))
|
||||
} else if (inode->i_ino == F2FS_NODE_INO(sbi)) {
|
||||
dec_page_count(sbi, F2FS_DIRTY_NODES);
|
||||
else
|
||||
} else {
|
||||
inode_dec_dirty_pages(inode);
|
||||
remove_dirty_inode(inode);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is atomic written page, keep Private */
|
||||
|
Reference in New Issue
Block a user