summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2025-07-08 18:03:08 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2025-07-22 15:55:50 +0000
commita63f2de2dd950aaa7c6008e90f30c43b34f643f5 (patch)
tree57ab551ac16df0243c173830fc40f04b04ed4b4d /fs/f2fs/node.c
parentf2fs: Pass a folio to ino_of_node() (diff)
downloadlinux-a63f2de2dd950aaa7c6008e90f30c43b34f643f5.tar.gz
linux-a63f2de2dd950aaa7c6008e90f30c43b34f643f5.zip
f2fs: Pass a folio to nid_of_node()
All callers have a folio so pass it in. Also make the argument const as the function does not modify 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>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index b3956daacbf8..750addd11713 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1477,14 +1477,14 @@ static int sanity_check_node_footer(struct f2fs_sb_info *sbi,
{
struct page *page = &folio->page;
- if (unlikely(nid != nid_of_node(page) ||
+ if (unlikely(nid != nid_of_node(folio) ||
(ntype == NODE_TYPE_INODE && !IS_INODE(page)) ||
(ntype == NODE_TYPE_XATTR &&
!f2fs_has_xattr_block(ofs_of_node(page))) ||
time_to_inject(sbi, FAULT_INCONSISTENT_FOOTER))) {
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(page), ino_of_node(folio),
+ ntype, nid, nid_of_node(folio), ino_of_node(folio),
ofs_of_node(page), cpver_of_node(page),
next_blkaddr_of_node(folio));
set_sbi_flag(sbi, SBI_NEED_FSCK);
@@ -1706,7 +1706,7 @@ static bool __write_node_folio(struct folio *folio, bool atomic, bool *submitted
goto redirty_out;
/* get old block addr of this node page */
- nid = nid_of_node(&folio->page);
+ nid = nid_of_node(folio);
f2fs_bug_on(sbi, folio->index != nid);
if (f2fs_get_node_info(sbi, nid, &ni, !do_balance))