aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/xattr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c
index f58cbb26323e..408373819e34 100644
--- a/fs/ext3/xattr.c
+++ b/fs/ext3/xattr.c
@@ -741,12 +741,11 @@ ext3_xattr_block_set(handle_t *handle, struct inode *inode,
741 } 741 }
742 } else { 742 } else {
743 /* Allocate a buffer where we construct the new block. */ 743 /* Allocate a buffer where we construct the new block. */
744 s->base = kmalloc(sb->s_blocksize, GFP_KERNEL); 744 s->base = kzalloc(sb->s_blocksize, GFP_KERNEL);
745 /* assert(header == s->base) */ 745 /* assert(header == s->base) */
746 error = -ENOMEM; 746 error = -ENOMEM;
747 if (s->base == NULL) 747 if (s->base == NULL)
748 goto cleanup; 748 goto cleanup;
749 memset(s->base, 0, sb->s_blocksize);
750 header(s->base)->h_magic = cpu_to_le32(EXT3_XATTR_MAGIC); 749 header(s->base)->h_magic = cpu_to_le32(EXT3_XATTR_MAGIC);
751 header(s->base)->h_blocks = cpu_to_le32(1); 750 header(s->base)->h_blocks = cpu_to_le32(1);
752 header(s->base)->h_refcount = cpu_to_le32(1); 751 header(s->base)->h_refcount = cpu_to_le32(1);