diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-11-16 16:59:14 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-01-02 19:27:26 -0800 |
commit | 292c196a3695e57980dc79dea3863462fa4831c4 (patch) | |
tree | c5ea753a4ba015482edf81e77854292756d7fde0 /fs/f2fs/node.c | |
parent | ace52288edf0cb5e7a52b681f057f86224c49c27 (diff) | |
download | linux-stable-292c196a3695e57980dc79dea3863462fa4831c4.tar.gz linux-stable-292c196a3695e57980dc79dea3863462fa4831c4.tar.bz2 linux-stable-292c196a3695e57980dc79dea3863462fa4831c4.zip |
f2fs: reserve nid resource for quota sysfile
During mkfs, quota sysfiles have already occupied nid resource,
it needs to adjust remaining available nid count in kernel side.
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index d3322752426f..2ce0321ab9c0 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2661,7 +2661,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 - - F2FS_RESERVED_NODE_NUM; + sbi->nquota_files - F2FS_RESERVED_NODE_NUM; nm_i->nid_cnt[FREE_NID] = 0; nm_i->nid_cnt[PREALLOC_NID] = 0; nm_i->nat_cnt = 0; |