diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-11-30 19:28:18 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-01-02 19:27:29 -0800 |
commit | 628b3d1438fbcb1f9e79472a0872a2c3018a48be (patch) | |
tree | e75a111c4eea20a4804c97332eb660d87ad1b390 /fs/f2fs/node.c | |
parent | acbf054d537d7efddc232e6c11a15d4be0507fd6 (diff) |
f2fs: inject fault to kvmalloc
This patch supports to inject fault into kvmalloc/kvzalloc.
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f3ab3a917d13..a9c340e43af9 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2707,17 +2707,17 @@ static int init_free_nid_cache(struct f2fs_sb_info *sbi) { struct f2fs_nm_info *nm_i = NM_I(sbi); - nm_i->free_nid_bitmap = kvzalloc(nm_i->nat_blocks * + nm_i->free_nid_bitmap = f2fs_kvzalloc(sbi, nm_i->nat_blocks * NAT_ENTRY_BITMAP_SIZE, GFP_KERNEL); if (!nm_i->free_nid_bitmap) return -ENOMEM; - nm_i->nat_block_bitmap = kvzalloc(nm_i->nat_blocks / 8, + nm_i->nat_block_bitmap = f2fs_kvzalloc(sbi, nm_i->nat_blocks / 8, GFP_KERNEL); if (!nm_i->nat_block_bitmap) return -ENOMEM; - nm_i->free_nid_count = kvzalloc(nm_i->nat_blocks * + nm_i->free_nid_count = f2fs_kvzalloc(sbi, nm_i->nat_blocks * sizeof(unsigned short), GFP_KERNEL); if (!nm_i->free_nid_count) return -ENOMEM; |