aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
959 (sizeof(struct buffer_head *) * nr_groups); 959 (sizeof(struct buffer_head *) * nr_groups);
960 960
961 if (size <= PAGE_SIZE) 961 if (size <= PAGE_SIZE)
962 bitmap = kmalloc(size, GFP_KERNEL); 962 bitmap = kzalloc(size, GFP_KERNEL);
963 else 963 else
964 bitmap = vmalloc(size); /* TODO: get rid of vmalloc */ 964 bitmap = vzalloc(size); /* TODO: get rid of vzalloc */
965 965
966 if (bitmap == NULL) { 966 if (bitmap == NULL) {
967 udf_error(sb, __func__, 967 udf_error(sb, __func__,
@@ -970,7 +970,6 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
970 return NULL; 970 return NULL;
971 } 971 }
972 972
973 memset(bitmap, 0x00, size);
974 bitmap->s_block_bitmap = (struct buffer_head **)(bitmap + 1); 973 bitmap->s_block_bitmap = (struct buffer_head **)(bitmap + 1);
975 bitmap->s_nr_groups = nr_groups; 974 bitmap->s_nr_groups = nr_groups;
976 return bitmap; 975 return bitmap;