summaryrefslogtreecommitdiff
path: root/fs/udf
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-04 20:08:04 -0700
committerJan Kara <jack@suse.cz>2011-01-06 17:03:53 +0100
commited2ae6f69148dcf9da725364e17184f27ba04dc2 (patch)
tree7ae6827263e48d41916d156c8bd7cdd3b85771a8 /fs/udf
parent3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff)
downloadkernel-common-ed2ae6f69148dcf9da725364e17184f27ba04dc2.tar.gz
kernel-common-ed2ae6f69148dcf9da725364e17184f27ba04dc2.tar.bz2
kernel-common-ed2ae6f69148dcf9da725364e17184f27ba04dc2.zip
fs/udf: Use vzalloc
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/super.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 4a5c7c61836a..f99ff5dbd741 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -959,9 +959,9 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
(sizeof(struct buffer_head *) * nr_groups);
if (size <= PAGE_SIZE)
- bitmap = kmalloc(size, GFP_KERNEL);
+ bitmap = kzalloc(size, GFP_KERNEL);
else
- bitmap = vmalloc(size); /* TODO: get rid of vmalloc */
+ bitmap = vzalloc(size); /* TODO: get rid of vzalloc */
if (bitmap == NULL) {
udf_error(sb, __func__,
@@ -970,7 +970,6 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
return NULL;
}
- memset(bitmap, 0x00, size);
bitmap->s_block_bitmap = (struct buffer_head **)(bitmap + 1);
bitmap->s_nr_groups = nr_groups;
return bitmap;