Commit 4975e45f authored by Denis Cheng's avatar Denis Cheng Committed by Linus Torvalds

fs: use kmem_cache_zalloc instead

Signed-off-by: default avatarDenis Cheng <crquan@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment