f2fs: Pass folios to copy_node_footer()

The only caller has folios so pass them in.  Also mark them as const to help
the compiler.

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:
Matthew Wilcox (Oracle) 2025-07-08 18:03:20 +01:00 committed by Jaegeuk Kim
parent 5398745334
commit 171a3aebbd
2 changed files with 5 additions and 4 deletions

View file

@ -293,10 +293,11 @@ static inline void fill_node_footer(struct page *page, nid_t nid,
(old_flag & OFFSET_BIT_MASK));
}
static inline void copy_node_footer(struct page *dst, struct page *src)
static inline void copy_node_footer(const struct folio *dst,
const struct folio *src)
{
struct f2fs_node *src_rn = F2FS_NODE(src);
struct f2fs_node *dst_rn = F2FS_NODE(dst);
struct f2fs_node *src_rn = F2FS_NODE(&src->page);
struct f2fs_node *dst_rn = F2FS_NODE(&dst->page);
memcpy(&dst_rn->footer, &src_rn->footer, sizeof(struct node_footer));
}

View file

@ -758,7 +758,7 @@ retry_prev:
}
}
copy_node_footer(&dn.node_folio->page, &folio->page);
copy_node_footer(dn.node_folio, folio);
fill_node_footer(&dn.node_folio->page, dn.nid, ni.ino,
ofs_of_node(&folio->page), false);
folio_mark_dirty(dn.node_folio);