projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b138547
)
f2fs: check the right return value of memory alloc function
author
Yunlei He
<heyunlei@huawei.com>
Mon, 2 Jul 2018 02:40:19 +0000
(10:40 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Sun, 29 Jul 2018 01:26:08 +0000
(18:26 -0700)
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>
fs/f2fs/node.c
patch
|
blob
|
history
diff --git
a/fs/f2fs/node.c
b/fs/f2fs/node.c
index
142b341
..
6f21319
100644
(file)
--- a/
fs/f2fs/node.c
+++ b/
fs/f2fs/node.c
@@
-2798,7
+2798,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;
}