All callers have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
---
fs/f2fs/node.c | 2 +-
fs/f2fs/node.h | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 9c47f1e73421..89a27bbc0226 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1485,7 +1485,7 @@ static int sanity_check_node_footer(struct f2fs_sb_info
*sbi,
f2fs_warn(sbi, "inconsistent node block, node_type:%d, nid:%lu,
"
"node_footer[nid:%u,ino:%u,ofs:%u,cpver:%llu,blkaddr:%u]",
ntype, nid, nid_of_node(folio), ino_of_node(folio),
- ofs_of_node(page), cpver_of_node(page),
+ ofs_of_node(page), cpver_of_node(folio),
next_blkaddr_of_node(folio));
set_sbi_flag(sbi, SBI_NEED_FSCK);
f2fs_handle_error(sbi, ERROR_INCONSISTENT_FOOTER);
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 91a037a1815d..f8d26d1b9cd0 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -262,9 +262,9 @@ static inline unsigned int ofs_of_node(const struct page
*node_page)
return flag >> OFFSET_BIT_SHIFT;
}
-static inline __u64 cpver_of_node(const struct page *node_page)
+static inline __u64 cpver_of_node(const struct folio *node_folio)
{
- struct f2fs_node *rn = F2FS_NODE(node_page);
+ struct f2fs_node *rn = F2FS_NODE(&node_folio->page);
return le64_to_cpu(rn->footer.cp_ver);
}
@@ -321,12 +321,12 @@ static inline bool is_recoverable_dnode(const struct
folio *folio)
/* Don't care crc part, if fsck.f2fs sets it. */
if (__is_set_ckpt_flags(ckpt, CP_NOCRC_RECOVERY_FLAG))
- return (cp_ver << 32) == (cpver_of_node(&folio->page) << 32);
+ return (cp_ver << 32) == (cpver_of_node(folio) << 32);
if (__is_set_ckpt_flags(ckpt, CP_CRC_RECOVERY_FLAG))
cp_ver |= (cur_cp_crc(ckpt) << 32);
- return cp_ver == cpver_of_node(&folio->page);
+ return cp_ver == cpver_of_node(folio);
}
/*
--
2.47.2
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel