aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/xattr.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2007-10-16 18:38:25 -0400
committerTheodore Ts'o <tytso@mit.edu>2007-10-17 18:49:57 -0400
commitd802ffa8850f2a80d141457d7221809182ed8c9f (patch)
treee5a3e9974f0242658ae41391990a28178cc42495 /fs/ext4/xattr.c
parent2d917969bc8dbde45900f5cbc2558e2cf1f8ec32 (diff)
JBD2/Ext4: Convert kmalloc to kzalloc in jbd2/ext4
Convert kmalloc to kzalloc() and get rid of the memset(). Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Diffstat (limited to 'fs/ext4/xattr.c')
-rw-r--r--fs/ext4/xattr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index b10d68fffb55..12c7d65fb0ca 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -750,12 +750,11 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
750 } 750 }
751 } else { 751 } else {
752 /* Allocate a buffer where we construct the new block. */ 752 /* Allocate a buffer where we construct the new block. */
753 s->base = kmalloc(sb->s_blocksize, GFP_KERNEL); 753 s->base = kzalloc(sb->s_blocksize, GFP_KERNEL);
754 /* assert(header == s->base) */ 754 /* assert(header == s->base) */
755 error = -ENOMEM; 755 error = -ENOMEM;
756 if (s->base == NULL) 756 if (s->base == NULL)
757 goto cleanup; 757 goto cleanup;
758 memset(s->base, 0, sb->s_blocksize);
759 header(s->base)->h_magic = cpu_to_le32(EXT4_XATTR_MAGIC); 758 header(s->base)->h_magic = cpu_to_le32(EXT4_XATTR_MAGIC);
760 header(s->base)->h_blocks = cpu_to_le32(1); 759 header(s->base)->h_blocks = cpu_to_le32(1);
761 header(s->base)->h_refcount = cpu_to_le32(1); 760 header(s->base)->h_refcount = cpu_to_le32(1);