mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 17:51:41 -04:00
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 <zangyangyang1@xiaomi.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
committed by
Jaegeuk Kim
parent
c910a64bc4
commit
5f65945427
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user