diff options
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1af7879bfb75..b32eb565e6b3 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1798,14 +1798,6 @@ static void merge_nats_in_set(struct f2fs_sb_info *sbi) write_unlock(&nm_i->nat_tree_lock); } -static bool __has_cursum_space(struct f2fs_summary_block *sum, int size) -{ - if (nats_in_cursum(sum) + size <= NAT_JOURNAL_ENTRIES) - return true; - else - return false; -} - static void remove_nats_in_journal(struct f2fs_sb_info *sbi) { struct f2fs_nm_info *nm_i = NM_I(sbi); @@ -1860,7 +1852,7 @@ void flush_nat_entries(struct f2fs_sb_info *sbi) * entries, remove all entries from journal and merge them * into nat entry set. */ - if (!__has_cursum_space(sum, nm_i->dirty_nat_cnt)) { + if (!__has_cursum_space(sum, nm_i->dirty_nat_cnt, NAT_JOURNAL)) { remove_nats_in_journal(sbi); /* @@ -1883,7 +1875,8 @@ void flush_nat_entries(struct f2fs_sb_info *sbi) struct page *page; nid_t start_nid = nes->start_nid; - if (to_journal && !__has_cursum_space(sum, nes->entry_cnt)) + if (to_journal && + !__has_cursum_space(sum, nes->entry_cnt, NAT_JOURNAL)) to_journal = false; if (to_journal) { |