mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
fs: use kmem_cache_zalloc instead
Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
87400c0475
commit
4975e45ff6
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue