summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorYunlei He <heyunlei@huawei.com>2018-06-27 09:46:21 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2018-07-29 04:23:26 +0300
commite15d54d5009688ccb2a5312f3b70d631615329c9 (patch)
treef8e2e2554de500ce33417b413621519002fab722 /fs/f2fs/node.c
parent9dc956b2c8523aed39d1e6508438be9fea28c8fc (diff)
downloadlinux-e15d54d5009688ccb2a5312f3b70d631615329c9.tar.xz
f2fs: Allocate and stat mem used by free nid bitmap more accurately
This patch used f2fs_bitmap_size macro to calculate mem used by free nid bitmap, and stat used mem including aligned part. Signed-off-by: Yunlei He <heyunlei@huawei.com> Reviewed-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 8e58990b9120..142b34130749 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2797,7 +2797,7 @@ static int init_free_nid_cache(struct f2fs_sb_info *sbi)
for (i = 0; i < nm_i->nat_blocks; i++) {
nm_i->free_nid_bitmap[i] = f2fs_kvzalloc(sbi,
- NAT_ENTRY_BITMAP_SIZE_ALIGNED, GFP_KERNEL);
+ f2fs_bitmap_size(NAT_ENTRY_PER_BLOCK), GFP_KERNEL);
if (!nm_i->free_nid_bitmap)
return -ENOMEM;
}