Commit b815bdc7 authored by Liu Song's avatar Liu Song Committed by Jaegeuk Kim

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: default avatarLiu Song <liu.song11@zte.com.cn>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent e5cc2c55
......@@ -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,10 +2116,8 @@ 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)
list_add_tail(&i->list, &nm_i->free_nid_list);
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment