f2fs: remove useless parameter of __insert_free_nid()

In current version, @state will only be FREE_NID. This parameter
has no real effect so remove it to keep clean.

Signed-off-by: Liu Song <liu.song11@zte.com.cn>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Liu Song 2020-06-28 21:48:13 +08:00 committed by Jaegeuk Kim
parent e5cc2c5563
commit b815bdc781

View File

@ -2108,7 +2108,7 @@ static struct free_nid *__lookup_free_nid_list(struct f2fs_nm_info *nm_i,
}
static int __insert_free_nid(struct f2fs_sb_info *sbi,
struct free_nid *i, enum nid_state state)
struct free_nid *i)
{
struct f2fs_nm_info *nm_i = NM_I(sbi);
@ -2116,9 +2116,7 @@ static int __insert_free_nid(struct f2fs_sb_info *sbi,
if (err)
return err;
f2fs_bug_on(sbi, state != i->state);
nm_i->nid_cnt[state]++;
if (state == FREE_NID)
nm_i->nid_cnt[FREE_NID]++;
list_add_tail(&i->list, &nm_i->free_nid_list);
return 0;
}
@ -2241,7 +2239,7 @@ static bool add_free_nid(struct f2fs_sb_info *sbi,
}
}
ret = true;
err = __insert_free_nid(sbi, i, FREE_NID);
err = __insert_free_nid(sbi, i);
err_out:
if (update) {
update_free_nid_bitmap(sbi, nid, ret, build);