mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:40:51 +07:00
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:
parent
e5cc2c5563
commit
b815bdc781
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user