提交 4975e45f 编写于 作者: D Denis Cheng 提交者: Linus Torvalds

fs: use kmem_cache_zalloc instead

Signed-off-by: NDenis Cheng <crquan@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 87400c04
......@@ -102,12 +102,11 @@ struct file *get_empty_filp(void)
goto over;
}
f = kmem_cache_alloc(filp_cachep, GFP_KERNEL);
f = kmem_cache_zalloc(filp_cachep, GFP_KERNEL);
if (f == NULL)
goto fail;
percpu_counter_inc(&nr_files);
memset(f, 0, sizeof(*f));
if (security_file_alloc(f))
goto fail_sec;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册