diff --git a/fs/file_table.c b/fs/file_table.c index 287fdce7f767fe3b3b61be8e95905e379086df81..ce3f39a4798a362c615ed51a2be83e4b616c8a86 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -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;