[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1184904431130-git-send-email-crquan@gmail.com>
Date:	Fri, 20 Jul 2007 12:07:11 +0800
From:	Denis Cheng <crquan@...il.com>
To:	Alexander Viro <viro@...iv.linux.org.uk>
Cc:	linux-kernel@...r.kernel.org, chdebra@...il.com,
	Denis Cheng <crquan@...il.com>
Subject: [PATCH] fs: use kmem_cache_zalloc instead
Signed-off-by: Denis Cheng <crquan@...il.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
