diff options
Diffstat (limited to 'fs/udf/balloc.c')
-rw-r--r-- | fs/udf/balloc.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index e0fd65fe73e8..cbfd6043274b 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c | |||
@@ -218,16 +218,18 @@ out: | |||
218 | return alloc_count; | 218 | return alloc_count; |
219 | } | 219 | } |
220 | 220 | ||
221 | static int udf_bitmap_new_block(struct super_block *sb, | 221 | static udf_pblk_t udf_bitmap_new_block(struct super_block *sb, |
222 | struct udf_bitmap *bitmap, uint16_t partition, | 222 | struct udf_bitmap *bitmap, uint16_t partition, |
223 | uint32_t goal, int *err) | 223 | uint32_t goal, int *err) |
224 | { | 224 | { |
225 | struct udf_sb_info *sbi = UDF_SB(sb); | 225 | struct udf_sb_info *sbi = UDF_SB(sb); |
226 | int newbit, bit = 0, block, block_group, group_start; | 226 | int newbit, bit = 0; |
227 | udf_pblk_t block; | ||
228 | int block_group, group_start; | ||
227 | int end_goal, nr_groups, bitmap_nr, i; | 229 | int end_goal, nr_groups, bitmap_nr, i; |
228 | struct buffer_head *bh = NULL; | 230 | struct buffer_head *bh = NULL; |
229 | char *ptr; | 231 | char *ptr; |
230 | int newblock = 0; | 232 | udf_pblk_t newblock = 0; |
231 | 233 | ||
232 | *err = -ENOSPC; | 234 | *err = -ENOSPC; |
233 | mutex_lock(&sbi->s_alloc_mutex); | 235 | mutex_lock(&sbi->s_alloc_mutex); |
@@ -545,13 +547,14 @@ static int udf_table_prealloc_blocks(struct super_block *sb, | |||
545 | return alloc_count; | 547 | return alloc_count; |
546 | } | 548 | } |
547 | 549 | ||
548 | static int udf_table_new_block(struct super_block *sb, | 550 | static udf_pblk_t udf_table_new_block(struct super_block *sb, |
549 | struct inode *table, uint16_t partition, | 551 | struct inode *table, uint16_t partition, |
550 | uint32_t goal, int *err) | 552 | uint32_t goal, int *err) |
551 | { | 553 | { |
552 | struct udf_sb_info *sbi = UDF_SB(sb); | 554 | struct udf_sb_info *sbi = UDF_SB(sb); |
553 | uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF; | 555 | uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF; |
554 | uint32_t newblock = 0, adsize; | 556 | udf_pblk_t newblock = 0; |
557 | uint32_t adsize; | ||
555 | uint32_t elen, goal_elen = 0; | 558 | uint32_t elen, goal_elen = 0; |
556 | struct kernel_lb_addr eloc, uninitialized_var(goal_eloc); | 559 | struct kernel_lb_addr eloc, uninitialized_var(goal_eloc); |
557 | struct extent_position epos, goal_epos; | 560 | struct extent_position epos, goal_epos; |
@@ -700,12 +703,12 @@ inline int udf_prealloc_blocks(struct super_block *sb, | |||
700 | return allocated; | 703 | return allocated; |
701 | } | 704 | } |
702 | 705 | ||
703 | inline int udf_new_block(struct super_block *sb, | 706 | inline udf_pblk_t udf_new_block(struct super_block *sb, |
704 | struct inode *inode, | 707 | struct inode *inode, |
705 | uint16_t partition, uint32_t goal, int *err) | 708 | uint16_t partition, uint32_t goal, int *err) |
706 | { | 709 | { |
707 | struct udf_part_map *map = &UDF_SB(sb)->s_partmaps[partition]; | 710 | struct udf_part_map *map = &UDF_SB(sb)->s_partmaps[partition]; |
708 | int block; | 711 | udf_pblk_t block; |
709 | 712 | ||
710 | if (map->s_partition_flags & UDF_PART_FLAG_UNALLOC_BITMAP) | 713 | if (map->s_partition_flags & UDF_PART_FLAG_UNALLOC_BITMAP) |
711 | block = udf_bitmap_new_block(sb, | 714 | block = udf_bitmap_new_block(sb, |