From: zangyangyang1 Date: Fri, 22 Nov 2024 10:58:22 +0000 (+0800) Subject: f2fs: cache more dentry pages X-Git-Tag: v6.14-rc1~63^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f6594542779e69c6c6e2b57341c352174135eed;p=thirdparty%2Fkernel%2Flinux.git f2fs: cache more dentry pages While traversing dir entries in dentry page, it's better to refresh current accessed page in lru list by using FGP_ACCESSED flag, otherwise, such page may has less chance to survive during memory reclaim, result in causing additional IO when revisiting dentry page. Signed-off-by: zangyangyang1 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 0657f731d4b7b..2ec0cfb41260d 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1280,7 +1280,7 @@ struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index, struct address_space *mapping = inode->i_mapping; struct page *page; - page = find_get_page(mapping, index); + page = find_get_page_flags(mapping, index, FGP_ACCESSED); if (page && PageUptodate(page)) return page; f2fs_put_page(page, 0);