mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: use kmem_cache_zalloc instead
@ 2007-07-20  4:07 Denis Cheng
  0 siblings, 0 replies; only message in thread
From: Denis Cheng @ 2007-07-20  4:07 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-kernel, chdebra, Denis Cheng

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 fs/file_table.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/file_table.c b/fs/file_table.c
index d17fd69..37453ff 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;
 
-- 
1.5.2.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-20  4:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-20  4:07 [PATCH] fs: use kmem_cache_zalloc instead Denis Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome