Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed2ae6f6 authored by Joe Perches's avatar Joe Perches Committed by Jan Kara
Browse files

fs/udf: Use vzalloc



Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 3c0eee3f
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;