aboutsummaryrefslogtreecommitdiffstats
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorDenis Cheng <crquan@gmail.com>2007-10-17 02:26:19 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:48 -0400
commit4975e45ff66845c9acc6c8619e80ef15eadf785e (patch)
treeb54586037ad8f902c8a8a3a33853b041c2c62207 /fs/file_table.c
parent87400c04753674f546c7779abf536d2a3b5e0b7e (diff)
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>
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c3
1 files changed, 1 insertions, 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)
102 goto over; 102 goto over;
103 } 103 }
104 104
105 f = kmem_cache_alloc(filp_cachep, GFP_KERNEL); 105 f = kmem_cache_zalloc(filp_cachep, GFP_KERNEL);
106 if (f == NULL) 106 if (f == NULL)
107 goto fail; 107 goto fail;
108 108
109 percpu_counter_inc(&nr_files); 109 percpu_counter_inc(&nr_files);
110 memset(f, 0, sizeof(*f));
111 if (security_file_alloc(f)) 110 if (security_file_alloc(f))
112 goto fail_sec; 111 goto fail_sec;
113 112