mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
f2fs: Pass an address to scan_nat_page()
Remove a conversion from folio to page by passing in the address of the first byte rather than the struct page containing it. 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:
parent
350b8441c0
commit
6b5c4a0359
|
|
@ -2421,10 +2421,9 @@ static void remove_free_nid(struct f2fs_sb_info *sbi, nid_t nid)
|
|||
}
|
||||
|
||||
static int scan_nat_page(struct f2fs_sb_info *sbi,
|
||||
struct page *nat_page, nid_t start_nid)
|
||||
struct f2fs_nat_block *nat_blk, nid_t start_nid)
|
||||
{
|
||||
struct f2fs_nm_info *nm_i = NM_I(sbi);
|
||||
struct f2fs_nat_block *nat_blk = page_address(nat_page);
|
||||
block_t blk_addr;
|
||||
unsigned int nat_ofs = NAT_BLOCK_OFFSET(start_nid);
|
||||
int i;
|
||||
|
|
@ -2549,7 +2548,8 @@ static int __f2fs_build_free_nids(struct f2fs_sb_info *sbi,
|
|||
if (IS_ERR(folio)) {
|
||||
ret = PTR_ERR(folio);
|
||||
} else {
|
||||
ret = scan_nat_page(sbi, &folio->page, nid);
|
||||
ret = scan_nat_page(sbi, folio_address(folio),
|
||||
nid);
|
||||
f2fs_folio_put(folio, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user