diff options
author | Mingming Cao <cmm@us.ibm.com> | 2007-10-19 02:39:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:34 -0400 |
commit | 8c3478a523a48470eb11a23f01249250684677d9 (patch) | |
tree | 5818d64427bcc1128fc74cc99e8f1fd1c9a54766 /fs/ext3 | |
parent | 345225c8e4a4adad9eb261db26aebcd3b87055ad (diff) |
JBD/ext3 cleanups: convert to kzalloc
Convert kmalloc to kzalloc() and get rid of the memset().
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/xattr.c | 3 |
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); |