summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorLiu Song <liu.song11@zte.com.cn>2020-06-28 21:48:13 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-07-07 21:51:45 -0700
commitb815bdc7817d5a27410a33475f3401bd47f5854e (patch)
tree3e8d1f8aabd44f5452d911b1dd34a8b8d9b135cc /fs/f2fs
parente5cc2c5563a4ac47c426e8d5d084d44fbecb68aa (diff)
downloadlinux-b815bdc7817d5a27410a33475f3401bd47f5854e.tar.gz
linux-b815bdc7817d5a27410a33475f3401bd47f5854e.tar.bz2
linux-b815bdc7817d5a27410a33475f3401bd47f5854e.zip
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/node.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 03e24df1c84f..b4f4b0d77553 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -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);