summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-08-05 18:27:25 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2019-08-23 07:57:14 -0700
commit27cae0bcc0510ba009f01806b4af13940ad96f7d (patch)
tree27bfe4fd7925f47b11715db8fe6af68ed906db47 /fs/f2fs/node.c
parent0b86f78920919cf36239f4e187ebad7f5d78b5f8 (diff)
f2fs: fix wrong available node count calculation
In mkfs, we have counted quota file's node number in cp.valid_node_count, so we have to avoid wrong substraction of quota node number in .available_nid/.avail_node_count calculation. f2fs_write_check_point_pack() { .. set_cp(valid_node_count, 1 + c.quota_inum + c.lpf_inum); Fixes: 292c196a3695 ("f2fs: reserve nid resource for quota sysfile") Fixes: 7b63f72f73af ("f2fs: fix to do sanity check on valid node/block count") Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index a18b2a895771..d9ba1db2d01e 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2964,7 +2964,7 @@ static int init_node_manager(struct f2fs_sb_info *sbi)
/* not used nids: 0, node, meta, (and root counted as valid node) */
nm_i->available_nids = nm_i->max_nid - sbi->total_valid_node_count -
- sbi->nquota_files - F2FS_RESERVED_NODE_NUM;
+ F2FS_RESERVED_NODE_NUM;
nm_i->nid_cnt[FREE_NID] = 0;
nm_i->nid_cnt[PREALLOC_NID] = 0;
nm_i->nat_cnt = 0;