struct curseg_info *curseg = CURSEG_I(sbi, CURSEG_HOT_DATA);
struct f2fs_journal *journal = curseg->journal;
unsigned int i, idx;
- unsigned int target = FREE_NID_PAGES * NAT_ENTRY_PER_BLOCK;
down_read(&nm_i->nat_tree_lock);
nid = i * NAT_ENTRY_PER_BLOCK + idx;
add_free_nid(sbi, nid, true);
- if (nm_i->nid_cnt[FREE_NID_LIST] >= target)
+ if (nm_i->nid_cnt[FREE_NID_LIST] >= MAX_FREE_NIDS)
goto out;
}
}
struct f2fs_nm_info *nm_i = NM_I(sbi);
struct page *page;
unsigned int i = 0;
- nid_t target = FREE_NID_PAGES * NAT_ENTRY_PER_BLOCK;
nid_t nid;
if (!enabled_nat_bits(sbi, NULL))
add_free_nid(sbi, nid, true);
}
- if (nm_i->nid_cnt[FREE_NID_LIST] >= target)
+ if (nm_i->nid_cnt[FREE_NID_LIST] >= MAX_FREE_NIDS)
goto out;
i++;
goto check_empty;
scan_nat_page(sbi, page, nid);
f2fs_put_page(page, 1);
- if (nm_i->nid_cnt[FREE_NID_LIST] < target) {
+ if (nm_i->nid_cnt[FREE_NID_LIST] < MAX_FREE_NIDS) {
i++;
goto check_partial;
}