]> xenbits.xensource.com Git - people/aperard/linux.git/commitdiff
f2fs: use IS_INODE replace IS_DNODE in f2fs_flush_inline_data
authorZhiguo Niu <zhiguo.niu@unisoc.com>
Wed, 17 Jan 2024 07:59:58 +0000 (15:59 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 6 Feb 2024 02:58:41 +0000 (18:58 -0800)
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: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c

index 9b546fd2101004c306d83bb5a33a11e53a88b7c7..1d898a16f05a1d226cc57bf9a7d3072aaae9a1f3 100644 (file)
@@ -1919,7 +1919,7 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi)
                for (i = 0; i < nr_folios; i++) {
                        struct page *page = &fbatch.folios[i]->page;
 
-                       if (!IS_DNODE(page))
+                       if (!IS_INODE(page))
                                continue;
 
                        lock_page(page);