mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-17 12:30:29 -05:00
f2fs: Pass a folio to f2fs_init_read_extent_tree()
The only caller alredy has a folio so pass it in. Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> 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
97e1b86169
commit
398c7df7bc
@@ -407,11 +407,11 @@ static void __drop_largest_extent(struct extent_tree *et,
|
||||
}
|
||||
}
|
||||
|
||||
void f2fs_init_read_extent_tree(struct inode *inode, struct page *ipage)
|
||||
void f2fs_init_read_extent_tree(struct inode *inode, struct folio *ifolio)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
|
||||
struct extent_tree_info *eti = &sbi->extent_tree[EX_READ];
|
||||
struct f2fs_extent *i_ext = &F2FS_INODE(ipage)->i_ext;
|
||||
struct f2fs_extent *i_ext = &F2FS_INODE(&ifolio->page)->i_ext;
|
||||
struct extent_tree *et;
|
||||
struct extent_node *en;
|
||||
struct extent_info ei;
|
||||
@@ -419,9 +419,9 @@ void f2fs_init_read_extent_tree(struct inode *inode, struct page *ipage)
|
||||
if (!__may_extent_tree(inode, EX_READ)) {
|
||||
/* drop largest read extent */
|
||||
if (i_ext->len) {
|
||||
f2fs_wait_on_page_writeback(ipage, NODE, true, true);
|
||||
f2fs_folio_wait_writeback(ifolio, NODE, true, true);
|
||||
i_ext->len = 0;
|
||||
set_page_dirty(ipage);
|
||||
folio_mark_dirty(ifolio);
|
||||
}
|
||||
set_inode_flag(inode, FI_NO_EXTENT);
|
||||
return;
|
||||
|
||||
@@ -4346,7 +4346,7 @@ int __init f2fs_create_extent_cache(void);
|
||||
void f2fs_destroy_extent_cache(void);
|
||||
|
||||
/* read extent cache ops */
|
||||
void f2fs_init_read_extent_tree(struct inode *inode, struct page *ipage);
|
||||
void f2fs_init_read_extent_tree(struct inode *inode, struct folio *ifolio);
|
||||
bool f2fs_lookup_read_extent_cache(struct inode *inode, pgoff_t pgofs,
|
||||
struct extent_info *ei);
|
||||
bool f2fs_lookup_read_extent_cache_block(struct inode *inode, pgoff_t index,
|
||||
|
||||
@@ -539,7 +539,7 @@ static int do_read_inode(struct inode *inode)
|
||||
}
|
||||
|
||||
/* Need all the flag bits */
|
||||
f2fs_init_read_extent_tree(inode, &node_folio->page);
|
||||
f2fs_init_read_extent_tree(inode, node_folio);
|
||||
f2fs_init_age_extent_tree(inode);
|
||||
|
||||
f2fs_folio_put(node_folio, true);
|
||||
|
||||
Reference in New Issue
Block a user