VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Denis Cheng <crquan@gmail.com> 2007-10-16 23:26:19 -0700 committer: Linus Torvalds <torvalds@woody.linux-foundation.org> 2007-10-17 08:42:48 -0700 commit: 4975e45ff66845c9acc6c8619e80ef15eadf785e parent: 87400c04753674f546c7779abf536d2a3b5e0b7e
Commit Summary:
fs: use kmem_cache_zalloc instead
Diffstat:
1 file changed, 1 insertion, 2 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 287fdce7f767..ce3f39a4798a 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;