summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorOliver Neukum2006-03-25 12:08:13 +0100
committerLinus Torvalds2006-03-25 17:23:00 +0100
commit11b0b5abb2097a63c1081d9b7e825b987b227972 (patch)
tree162c828c8d807a1b30869acbe11682dc9222dc16 /fs/super.c
parent[PATCH] Fix memory leak in isapnp (diff)
downloadkernel-qcow2-linux-11b0b5abb2097a63c1081d9b7e825b987b227972.tar.gz
kernel-qcow2-linux-11b0b5abb2097a63c1081d9b7e825b987b227972.tar.xz
kernel-qcow2-linux-11b0b5abb2097a63c1081d9b7e825b987b227972.zip
[PATCH] use kzalloc and kcalloc in core fs code
Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/super.c b/fs/super.c
index 37554b876182..8743e9bbb297 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -55,11 +55,10 @@ DEFINE_SPINLOCK(sb_lock);
*/
static struct super_block *alloc_super(void)
{
- struct super_block *s = kmalloc(sizeof(struct super_block), GFP_USER);
+ struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER);
static struct super_operations default_op;
if (s) {
- memset(s, 0, sizeof(struct super_block));
if (security_sb_alloc(s)) {
kfree(s);
s = NULL;