Commit 8e9c1a34 authored by Zhiguo Niu's avatar Zhiguo Niu Committed by Jaegeuk Kim

f2fs: use IS_INODE replace IS_DNODE in f2fs_flush_inline_data

Now IS_DNODE is used in f2fs_flush_inline_data and it has some problems:
1. Just only inodes may include inline data,not all direct nodes
2. When system IO is busy, it is inefficient to lock a direct node page
but not an inode page. Besides, if this direct node page is being
locked by others for IO, f2fs_flush_inline_data will be blocked here,
which will affects the checkpoint process, this is unreasonable.

So IS_INODE should be used in f2fs_flush_inline_data.
Signed-off-by: default avatarZhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent f289e95f
...@@ -1919,7 +1919,7 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) ...@@ -1919,7 +1919,7 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi)
for (i = 0; i < nr_folios; i++) { for (i = 0; i < nr_folios; i++) {
struct page *page = &fbatch.folios[i]->page; struct page *page = &fbatch.folios[i]->page;
if (!IS_DNODE(page)) if (!IS_INODE(page))
continue; continue;
lock_page(page); lock_page(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment