diff options
| author | Yunlei He <heyunlei@huawei.com> | 2018-07-02 10:40:19 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-09-18 13:36:43 -0700 |
| commit | 271b5b05e1debaccedf4e3e30488096dfcd105d5 (patch) | |
| tree | 53fdbb78a9032be616ab0f04b0ae622f6dd99129 | |
| parent | 76e16a4d6e69eb0ded796750383081a51f460ea8 (diff) | |
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>
| -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 6c24811e7b9d..52d95e01922a 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2801,7 +2801,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, f2fs_bitmap_size(NAT_ENTRY_PER_BLOCK), GFP_KERNEL); - if (!nm_i->free_nid_bitmap) + if (!nm_i->free_nid_bitmap[i]) return -ENOMEM; } |
