Skip to content

Commit c07de75

Browse files
Matthew Wilcox (Oracle)Jaegeuk Kim
authored andcommitted
f2fs: Pass the nat_blk to __update_nat_bits()
The page argument is only used to look up the address of the nat_blk. Since the caller already has it, pass it in instead. Also mark it const as the nat_blk isn't modified by this function. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 3a19caf commit c07de75

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/f2fs/node.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2969,11 +2969,10 @@ static void __adjust_nat_entry_set(struct nat_entry_set *nes,
29692969
}
29702970

29712971
static void __update_nat_bits(struct f2fs_sb_info *sbi, nid_t start_nid,
2972-
struct page *page)
2972+
const struct f2fs_nat_block *nat_blk)
29732973
{
29742974
struct f2fs_nm_info *nm_i = NM_I(sbi);
29752975
unsigned int nat_index = start_nid / NAT_ENTRY_PER_BLOCK;
2976-
struct f2fs_nat_block *nat_blk = page_address(page);
29772976
int valid = 0;
29782977
int i = 0;
29792978

@@ -3064,7 +3063,7 @@ static int __flush_nat_entry_set(struct f2fs_sb_info *sbi,
30643063
if (to_journal) {
30653064
up_write(&curseg->journal_rwsem);
30663065
} else {
3067-
__update_nat_bits(sbi, start_nid, &folio->page);
3066+
__update_nat_bits(sbi, start_nid, nat_blk);
30683067
f2fs_folio_put(folio, true);
30693068
}
30703069

0 commit comments

Comments
 (0)