]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: invalidate meta pages only for post_read required inode
authorChao Yu <chao@kernel.org>
Tue, 12 Jul 2022 15:26:43 +0000 (23:26 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 31 Jul 2022 03:17:06 +0000 (20:17 -0700)
commitc28bba2cd31cd73db644d8fce3c96b02053aa163
tree1382ddb49e198f3c6b0d98d3840b336421939b86
parent3c8c979330ded10fdd5398ec62629c0064b021ed
f2fs: invalidate meta pages only for post_read required inode

After commit cb967454d861 ("f2fs: invalidate META_MAPPING before
IPU/DIO write"), invalidate_mapping_pages() will be called to
avoid race condition in between IPU/DIO and readahead for GC.

However, readahead flow is only used for post_read required inode,
so this patch adds check condition to avoids unnecessary page cache
invalidating for non-post_read inode.

Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c