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)
commit0d5b9d8156396bbe1c982708b38ab9e188c45ec9
tree1382ddb49e198f3c6b0d98d3840b336421939b86
parenta8634ccf5d626506100bb753327e36e6c6b3df70
f2fs: invalidate meta pages only for post_read required inode

After commit e3b49ea36802 ("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