aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/balloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/balloc.c')
-rw-r--r--fs/udf/balloc.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c
index 2bb788a2acb1..1237900e81b6 100644
--- a/fs/udf/balloc.c
+++ b/fs/udf/balloc.c
@@ -87,7 +87,7 @@ static int read_block_bitmap(struct super_block *sb,
87{ 87{
88 struct buffer_head *bh = NULL; 88 struct buffer_head *bh = NULL;
89 int retval = 0; 89 int retval = 0;
90 kernel_lb_addr loc; 90 struct kernel_lb_addr loc;
91 91
92 loc.logicalBlockNum = bitmap->s_extPosition; 92 loc.logicalBlockNum = bitmap->s_extPosition;
93 loc.partitionReferenceNum = UDF_SB(sb)->s_partition; 93 loc.partitionReferenceNum = UDF_SB(sb)->s_partition;
@@ -156,7 +156,7 @@ static bool udf_add_free_space(struct udf_sb_info *sbi,
156static void udf_bitmap_free_blocks(struct super_block *sb, 156static void udf_bitmap_free_blocks(struct super_block *sb,
157 struct inode *inode, 157 struct inode *inode,
158 struct udf_bitmap *bitmap, 158 struct udf_bitmap *bitmap,
159 kernel_lb_addr bloc, uint32_t offset, 159 struct kernel_lb_addr bloc, uint32_t offset,
160 uint32_t count) 160 uint32_t count)
161{ 161{
162 struct udf_sb_info *sbi = UDF_SB(sb); 162 struct udf_sb_info *sbi = UDF_SB(sb);
@@ -425,13 +425,13 @@ error_return:
425static void udf_table_free_blocks(struct super_block *sb, 425static void udf_table_free_blocks(struct super_block *sb,
426 struct inode *inode, 426 struct inode *inode,
427 struct inode *table, 427 struct inode *table,
428 kernel_lb_addr bloc, uint32_t offset, 428 struct kernel_lb_addr bloc, uint32_t offset,
429 uint32_t count) 429 uint32_t count)
430{ 430{
431 struct udf_sb_info *sbi = UDF_SB(sb); 431 struct udf_sb_info *sbi = UDF_SB(sb);
432 uint32_t start, end; 432 uint32_t start, end;
433 uint32_t elen; 433 uint32_t elen;
434 kernel_lb_addr eloc; 434 struct kernel_lb_addr eloc;
435 struct extent_position oepos, epos; 435 struct extent_position oepos, epos;
436 int8_t etype; 436 int8_t etype;
437 int i; 437 int i;
@@ -532,8 +532,8 @@ static void udf_table_free_blocks(struct super_block *sb,
532 */ 532 */
533 533
534 int adsize; 534 int adsize;
535 short_ad *sad = NULL; 535 struct short_ad *sad = NULL;
536 long_ad *lad = NULL; 536 struct long_ad *lad = NULL;
537 struct allocExtDesc *aed; 537 struct allocExtDesc *aed;
538 538
539 eloc.logicalBlockNum = start; 539 eloc.logicalBlockNum = start;
@@ -541,9 +541,9 @@ static void udf_table_free_blocks(struct super_block *sb,
541 (count << sb->s_blocksize_bits); 541 (count << sb->s_blocksize_bits);
542 542
543 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 543 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
544 adsize = sizeof(short_ad); 544 adsize = sizeof(struct short_ad);
545 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 545 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG)
546 adsize = sizeof(long_ad); 546 adsize = sizeof(struct long_ad);
547 else { 547 else {
548 brelse(oepos.bh); 548 brelse(oepos.bh);
549 brelse(epos.bh); 549 brelse(epos.bh);
@@ -601,15 +601,15 @@ static void udf_table_free_blocks(struct super_block *sb,
601 if (sbi->s_udfrev >= 0x0200) 601 if (sbi->s_udfrev >= 0x0200)
602 udf_new_tag(epos.bh->b_data, TAG_IDENT_AED, 602 udf_new_tag(epos.bh->b_data, TAG_IDENT_AED,
603 3, 1, epos.block.logicalBlockNum, 603 3, 1, epos.block.logicalBlockNum,
604 sizeof(tag)); 604 sizeof(struct tag));
605 else 605 else
606 udf_new_tag(epos.bh->b_data, TAG_IDENT_AED, 606 udf_new_tag(epos.bh->b_data, TAG_IDENT_AED,
607 2, 1, epos.block.logicalBlockNum, 607 2, 1, epos.block.logicalBlockNum,
608 sizeof(tag)); 608 sizeof(struct tag));
609 609
610 switch (iinfo->i_alloc_type) { 610 switch (iinfo->i_alloc_type) {
611 case ICBTAG_FLAG_AD_SHORT: 611 case ICBTAG_FLAG_AD_SHORT:
612 sad = (short_ad *)sptr; 612 sad = (struct short_ad *)sptr;
613 sad->extLength = cpu_to_le32( 613 sad->extLength = cpu_to_le32(
614 EXT_NEXT_EXTENT_ALLOCDECS | 614 EXT_NEXT_EXTENT_ALLOCDECS |
615 sb->s_blocksize); 615 sb->s_blocksize);
@@ -617,7 +617,7 @@ static void udf_table_free_blocks(struct super_block *sb,
617 cpu_to_le32(epos.block.logicalBlockNum); 617 cpu_to_le32(epos.block.logicalBlockNum);
618 break; 618 break;
619 case ICBTAG_FLAG_AD_LONG: 619 case ICBTAG_FLAG_AD_LONG:
620 lad = (long_ad *)sptr; 620 lad = (struct long_ad *)sptr;
621 lad->extLength = cpu_to_le32( 621 lad->extLength = cpu_to_le32(
622 EXT_NEXT_EXTENT_ALLOCDECS | 622 EXT_NEXT_EXTENT_ALLOCDECS |
623 sb->s_blocksize); 623 sb->s_blocksize);
@@ -666,7 +666,7 @@ static int udf_table_prealloc_blocks(struct super_block *sb,
666 struct udf_sb_info *sbi = UDF_SB(sb); 666 struct udf_sb_info *sbi = UDF_SB(sb);
667 int alloc_count = 0; 667 int alloc_count = 0;
668 uint32_t elen, adsize; 668 uint32_t elen, adsize;
669 kernel_lb_addr eloc; 669 struct kernel_lb_addr eloc;
670 struct extent_position epos; 670 struct extent_position epos;
671 int8_t etype = -1; 671 int8_t etype = -1;
672 struct udf_inode_info *iinfo; 672 struct udf_inode_info *iinfo;
@@ -677,9 +677,9 @@ static int udf_table_prealloc_blocks(struct super_block *sb,
677 677
678 iinfo = UDF_I(table); 678 iinfo = UDF_I(table);
679 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 679 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
680 adsize = sizeof(short_ad); 680 adsize = sizeof(struct short_ad);
681 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 681 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG)
682 adsize = sizeof(long_ad); 682 adsize = sizeof(struct long_ad);
683 else 683 else
684 return 0; 684 return 0;
685 685
@@ -735,7 +735,7 @@ static int udf_table_new_block(struct super_block *sb,
735 uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF; 735 uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF;
736 uint32_t newblock = 0, adsize; 736 uint32_t newblock = 0, adsize;
737 uint32_t elen, goal_elen = 0; 737 uint32_t elen, goal_elen = 0;
738 kernel_lb_addr eloc, uninitialized_var(goal_eloc); 738 struct kernel_lb_addr eloc, uninitialized_var(goal_eloc);
739 struct extent_position epos, goal_epos; 739 struct extent_position epos, goal_epos;
740 int8_t etype; 740 int8_t etype;
741 struct udf_inode_info *iinfo = UDF_I(table); 741 struct udf_inode_info *iinfo = UDF_I(table);
@@ -743,9 +743,9 @@ static int udf_table_new_block(struct super_block *sb,
743 *err = -ENOSPC; 743 *err = -ENOSPC;
744 744
745 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 745 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
746 adsize = sizeof(short_ad); 746 adsize = sizeof(struct short_ad);
747 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 747 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG)
748 adsize = sizeof(long_ad); 748 adsize = sizeof(struct long_ad);
749 else 749 else
750 return newblock; 750 return newblock;
751 751
@@ -830,7 +830,7 @@ static int udf_table_new_block(struct super_block *sb,
830 830
831inline void udf_free_blocks(struct super_block *sb, 831inline void udf_free_blocks(struct super_block *sb,
832 struct inode *inode, 832 struct inode *inode,
833 kernel_lb_addr bloc, uint32_t offset, 833 struct kernel_lb_addr bloc, uint32_t offset,
834 uint32_t count) 834 uint32_t count)
835{ 835{
836 uint16_t partition = bloc.partitionReferenceNum; 836 uint16_t partition = bloc.partitionReferenceNum;