f2fs: check the right return value of memory alloc function
This patch check the right return value of memory alloc function Signed-off-by: Yunlei He <heyunlei@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
76e16a4d6e
commit
271b5b05e1
1 changed files with 1 additions and 1 deletions
|
@ -2801,7 +2801,7 @@ static int init_free_nid_cache(struct f2fs_sb_info *sbi)
|
||||||
for (i = 0; i < nm_i->nat_blocks; i++) {
|
for (i = 0; i < nm_i->nat_blocks; i++) {
|
||||||
nm_i->free_nid_bitmap[i] = f2fs_kvzalloc(sbi,
|
nm_i->free_nid_bitmap[i] = f2fs_kvzalloc(sbi,
|
||||||
f2fs_bitmap_size(NAT_ENTRY_PER_BLOCK), GFP_KERNEL);
|
f2fs_bitmap_size(NAT_ENTRY_PER_BLOCK), GFP_KERNEL);
|
||||||
if (!nm_i->free_nid_bitmap)
|
if (!nm_i->free_nid_bitmap[i])
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue