diff options
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r-- | fs/udf/super.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index dafa05f0110b..9f516d4baf9d 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -563,7 +563,7 @@ udf_vrs(struct super_block *sb, int silent) | |||
563 | 563 | ||
564 | if (vsd->stdIdent[0] == 0) | 564 | if (vsd->stdIdent[0] == 0) |
565 | { | 565 | { |
566 | udf_release_data(bh); | 566 | brelse(bh); |
567 | break; | 567 | break; |
568 | } | 568 | } |
569 | else if (!strncmp(vsd->stdIdent, VSD_STD_ID_CD001, VSD_STD_ID_LEN)) | 569 | else if (!strncmp(vsd->stdIdent, VSD_STD_ID_CD001, VSD_STD_ID_LEN)) |
@@ -596,7 +596,7 @@ udf_vrs(struct super_block *sb, int silent) | |||
596 | } | 596 | } |
597 | else if (!strncmp(vsd->stdIdent, VSD_STD_ID_TEA01, VSD_STD_ID_LEN)) | 597 | else if (!strncmp(vsd->stdIdent, VSD_STD_ID_TEA01, VSD_STD_ID_LEN)) |
598 | { | 598 | { |
599 | udf_release_data(bh); | 599 | brelse(bh); |
600 | break; | 600 | break; |
601 | } | 601 | } |
602 | else if (!strncmp(vsd->stdIdent, VSD_STD_ID_NSR02, VSD_STD_ID_LEN)) | 602 | else if (!strncmp(vsd->stdIdent, VSD_STD_ID_NSR02, VSD_STD_ID_LEN)) |
@@ -607,7 +607,7 @@ udf_vrs(struct super_block *sb, int silent) | |||
607 | { | 607 | { |
608 | nsr03 = sector; | 608 | nsr03 = sector; |
609 | } | 609 | } |
610 | udf_release_data(bh); | 610 | brelse(bh); |
611 | } | 611 | } |
612 | 612 | ||
613 | if (nsr03) | 613 | if (nsr03) |
@@ -673,7 +673,7 @@ udf_find_anchor(struct super_block *sb) | |||
673 | { | 673 | { |
674 | ident = le16_to_cpu(((tag *)bh->b_data)->tagIdent); | 674 | ident = le16_to_cpu(((tag *)bh->b_data)->tagIdent); |
675 | location = le32_to_cpu(((tag *)bh->b_data)->tagLocation); | 675 | location = le32_to_cpu(((tag *)bh->b_data)->tagLocation); |
676 | udf_release_data(bh); | 676 | brelse(bh); |
677 | } | 677 | } |
678 | 678 | ||
679 | if (ident == TAG_IDENT_AVDP) | 679 | if (ident == TAG_IDENT_AVDP) |
@@ -708,7 +708,7 @@ udf_find_anchor(struct super_block *sb) | |||
708 | { | 708 | { |
709 | ident = le16_to_cpu(((tag *)bh->b_data)->tagIdent); | 709 | ident = le16_to_cpu(((tag *)bh->b_data)->tagIdent); |
710 | location = le32_to_cpu(((tag *)bh->b_data)->tagLocation); | 710 | location = le32_to_cpu(((tag *)bh->b_data)->tagLocation); |
711 | udf_release_data(bh); | 711 | brelse(bh); |
712 | } | 712 | } |
713 | 713 | ||
714 | if (ident == TAG_IDENT_AVDP && | 714 | if (ident == TAG_IDENT_AVDP && |
@@ -727,7 +727,7 @@ udf_find_anchor(struct super_block *sb) | |||
727 | { | 727 | { |
728 | ident = le16_to_cpu(((tag *)bh->b_data)->tagIdent); | 728 | ident = le16_to_cpu(((tag *)bh->b_data)->tagIdent); |
729 | location = le32_to_cpu(((tag *)bh->b_data)->tagLocation); | 729 | location = le32_to_cpu(((tag *)bh->b_data)->tagLocation); |
730 | udf_release_data(bh); | 730 | brelse(bh); |
731 | } | 731 | } |
732 | 732 | ||
733 | if (ident == TAG_IDENT_AVDP && | 733 | if (ident == TAG_IDENT_AVDP && |
@@ -749,7 +749,7 @@ udf_find_anchor(struct super_block *sb) | |||
749 | { | 749 | { |
750 | ident = le16_to_cpu(((tag *)bh->b_data)->tagIdent); | 750 | ident = le16_to_cpu(((tag *)bh->b_data)->tagIdent); |
751 | location = le32_to_cpu(((tag *)bh->b_data)->tagLocation); | 751 | location = le32_to_cpu(((tag *)bh->b_data)->tagLocation); |
752 | udf_release_data(bh); | 752 | brelse(bh); |
753 | 753 | ||
754 | if (ident == TAG_IDENT_AVDP && location == 256) | 754 | if (ident == TAG_IDENT_AVDP && location == 256) |
755 | UDF_SET_FLAG(sb, UDF_FLAG_VARCONV); | 755 | UDF_SET_FLAG(sb, UDF_FLAG_VARCONV); |
@@ -766,7 +766,7 @@ udf_find_anchor(struct super_block *sb) | |||
766 | } | 766 | } |
767 | else | 767 | else |
768 | { | 768 | { |
769 | udf_release_data(bh); | 769 | brelse(bh); |
770 | if ((ident != TAG_IDENT_AVDP) && (i || | 770 | if ((ident != TAG_IDENT_AVDP) && (i || |
771 | (ident != TAG_IDENT_FE && ident != TAG_IDENT_EFE))) | 771 | (ident != TAG_IDENT_FE && ident != TAG_IDENT_EFE))) |
772 | { | 772 | { |
@@ -795,7 +795,7 @@ udf_find_fileset(struct super_block *sb, kernel_lb_addr *fileset, kernel_lb_addr | |||
795 | return 1; | 795 | return 1; |
796 | else if (ident != TAG_IDENT_FSD) | 796 | else if (ident != TAG_IDENT_FSD) |
797 | { | 797 | { |
798 | udf_release_data(bh); | 798 | brelse(bh); |
799 | return 1; | 799 | return 1; |
800 | } | 800 | } |
801 | 801 | ||
@@ -834,7 +834,7 @@ udf_find_fileset(struct super_block *sb, kernel_lb_addr *fileset, kernel_lb_addr | |||
834 | newfileset.logicalBlockNum += 1 + | 834 | newfileset.logicalBlockNum += 1 + |
835 | ((le32_to_cpu(sp->numOfBytes) + sizeof(struct spaceBitmapDesc) - 1) | 835 | ((le32_to_cpu(sp->numOfBytes) + sizeof(struct spaceBitmapDesc) - 1) |
836 | >> sb->s_blocksize_bits); | 836 | >> sb->s_blocksize_bits); |
837 | udf_release_data(bh); | 837 | brelse(bh); |
838 | break; | 838 | break; |
839 | } | 839 | } |
840 | case TAG_IDENT_FSD: | 840 | case TAG_IDENT_FSD: |
@@ -845,7 +845,7 @@ udf_find_fileset(struct super_block *sb, kernel_lb_addr *fileset, kernel_lb_addr | |||
845 | default: | 845 | default: |
846 | { | 846 | { |
847 | newfileset.logicalBlockNum ++; | 847 | newfileset.logicalBlockNum ++; |
848 | udf_release_data(bh); | 848 | brelse(bh); |
849 | bh = NULL; | 849 | bh = NULL; |
850 | break; | 850 | break; |
851 | } | 851 | } |
@@ -865,7 +865,7 @@ udf_find_fileset(struct super_block *sb, kernel_lb_addr *fileset, kernel_lb_addr | |||
865 | 865 | ||
866 | UDF_SB_PARTITION(sb) = fileset->partitionReferenceNum; | 866 | UDF_SB_PARTITION(sb) = fileset->partitionReferenceNum; |
867 | udf_load_fileset(sb, bh, root); | 867 | udf_load_fileset(sb, bh, root); |
868 | udf_release_data(bh); | 868 | brelse(bh); |
869 | return 0; | 869 | return 0; |
870 | } | 870 | } |
871 | return 1; | 871 | return 1; |
@@ -1083,7 +1083,7 @@ udf_load_logicalvol(struct super_block *sb, struct buffer_head * bh, kernel_lb_a | |||
1083 | if (ident != 0 || | 1083 | if (ident != 0 || |
1084 | strncmp(st->sparingIdent.ident, UDF_ID_SPARING, strlen(UDF_ID_SPARING))) | 1084 | strncmp(st->sparingIdent.ident, UDF_ID_SPARING, strlen(UDF_ID_SPARING))) |
1085 | { | 1085 | { |
1086 | udf_release_data(UDF_SB_TYPESPAR(sb,i).s_spar_map[j]); | 1086 | brelse(UDF_SB_TYPESPAR(sb,i).s_spar_map[j]); |
1087 | UDF_SB_TYPESPAR(sb,i).s_spar_map[j] = NULL; | 1087 | UDF_SB_TYPESPAR(sb,i).s_spar_map[j] = NULL; |
1088 | } | 1088 | } |
1089 | } | 1089 | } |
@@ -1137,12 +1137,12 @@ udf_load_logicalvolint(struct super_block *sb, kernel_extent_ad loc) | |||
1137 | udf_load_logicalvolint(sb, leea_to_cpu(UDF_SB_LVID(sb)->nextIntegrityExt)); | 1137 | udf_load_logicalvolint(sb, leea_to_cpu(UDF_SB_LVID(sb)->nextIntegrityExt)); |
1138 | 1138 | ||
1139 | if (UDF_SB_LVIDBH(sb) != bh) | 1139 | if (UDF_SB_LVIDBH(sb) != bh) |
1140 | udf_release_data(bh); | 1140 | brelse(bh); |
1141 | loc.extLength -= sb->s_blocksize; | 1141 | loc.extLength -= sb->s_blocksize; |
1142 | loc.extLocation ++; | 1142 | loc.extLocation ++; |
1143 | } | 1143 | } |
1144 | if (UDF_SB_LVIDBH(sb) != bh) | 1144 | if (UDF_SB_LVIDBH(sb) != bh) |
1145 | udf_release_data(bh); | 1145 | brelse(bh); |
1146 | } | 1146 | } |
1147 | 1147 | ||
1148 | /* | 1148 | /* |
@@ -1245,7 +1245,7 @@ udf_process_sequence(struct super_block *sb, long block, long lastblock, kernel_ | |||
1245 | done = 1; | 1245 | done = 1; |
1246 | break; | 1246 | break; |
1247 | } | 1247 | } |
1248 | udf_release_data(bh); | 1248 | brelse(bh); |
1249 | } | 1249 | } |
1250 | for (i=0; i<VDS_POS_LENGTH; i++) | 1250 | for (i=0; i<VDS_POS_LENGTH; i++) |
1251 | { | 1251 | { |
@@ -1267,10 +1267,10 @@ udf_process_sequence(struct super_block *sb, long block, long lastblock, kernel_ | |||
1267 | gd = (struct generic_desc *)bh2->b_data; | 1267 | gd = (struct generic_desc *)bh2->b_data; |
1268 | if (ident == TAG_IDENT_PD) | 1268 | if (ident == TAG_IDENT_PD) |
1269 | udf_load_partdesc(sb, bh2); | 1269 | udf_load_partdesc(sb, bh2); |
1270 | udf_release_data(bh2); | 1270 | brelse(bh2); |
1271 | } | 1271 | } |
1272 | } | 1272 | } |
1273 | udf_release_data(bh); | 1273 | brelse(bh); |
1274 | } | 1274 | } |
1275 | } | 1275 | } |
1276 | 1276 | ||
@@ -1333,7 +1333,7 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset) | |||
1333 | reserve_e = reserve_e >> sb->s_blocksize_bits; | 1333 | reserve_e = reserve_e >> sb->s_blocksize_bits; |
1334 | reserve_e += reserve_s; | 1334 | reserve_e += reserve_s; |
1335 | 1335 | ||
1336 | udf_release_data(bh); | 1336 | brelse(bh); |
1337 | 1337 | ||
1338 | /* Process the main & reserve sequences */ | 1338 | /* Process the main & reserve sequences */ |
1339 | /* responsible for finding the PartitionDesc(s) */ | 1339 | /* responsible for finding the PartitionDesc(s) */ |
@@ -1408,7 +1408,7 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset) | |||
1408 | udf_ext0_offset(UDF_SB_VAT(sb)); | 1408 | udf_ext0_offset(UDF_SB_VAT(sb)); |
1409 | UDF_SB_TYPEVIRT(sb,i).s_num_entries = (UDF_SB_VAT(sb)->i_size - | 1409 | UDF_SB_TYPEVIRT(sb,i).s_num_entries = (UDF_SB_VAT(sb)->i_size - |
1410 | UDF_SB_TYPEVIRT(sb,i).s_start_offset) >> 2; | 1410 | UDF_SB_TYPEVIRT(sb,i).s_start_offset) >> 2; |
1411 | udf_release_data(bh); | 1411 | brelse(bh); |
1412 | } | 1412 | } |
1413 | UDF_SB_PARTROOT(sb,i) = udf_get_pblock(sb, 0, i, 0); | 1413 | UDF_SB_PARTROOT(sb,i) = udf_get_pblock(sb, 0, i, 0); |
1414 | UDF_SB_PARTLEN(sb,i) = UDF_SB_PARTLEN(sb,ino.partitionReferenceNum); | 1414 | UDF_SB_PARTLEN(sb,i) = UDF_SB_PARTLEN(sb,ino.partitionReferenceNum); |
@@ -1680,7 +1680,7 @@ error_out: | |||
1680 | if (UDF_SB_PARTTYPE(sb, UDF_SB_PARTITION(sb)) == UDF_SPARABLE_MAP15) | 1680 | if (UDF_SB_PARTTYPE(sb, UDF_SB_PARTITION(sb)) == UDF_SPARABLE_MAP15) |
1681 | { | 1681 | { |
1682 | for (i=0; i<4; i++) | 1682 | for (i=0; i<4; i++) |
1683 | udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]); | 1683 | brelse(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]); |
1684 | } | 1684 | } |
1685 | } | 1685 | } |
1686 | #ifdef CONFIG_UDF_NLS | 1686 | #ifdef CONFIG_UDF_NLS |
@@ -1689,7 +1689,7 @@ error_out: | |||
1689 | #endif | 1689 | #endif |
1690 | if (!(sb->s_flags & MS_RDONLY)) | 1690 | if (!(sb->s_flags & MS_RDONLY)) |
1691 | udf_close_lvid(sb); | 1691 | udf_close_lvid(sb); |
1692 | udf_release_data(UDF_SB_LVIDBH(sb)); | 1692 | brelse(UDF_SB_LVIDBH(sb)); |
1693 | UDF_SB_FREE(sb); | 1693 | UDF_SB_FREE(sb); |
1694 | kfree(sbi); | 1694 | kfree(sbi); |
1695 | sb->s_fs_info = NULL; | 1695 | sb->s_fs_info = NULL; |
@@ -1758,7 +1758,7 @@ udf_put_super(struct super_block *sb) | |||
1758 | if (UDF_SB_PARTTYPE(sb, UDF_SB_PARTITION(sb)) == UDF_SPARABLE_MAP15) | 1758 | if (UDF_SB_PARTTYPE(sb, UDF_SB_PARTITION(sb)) == UDF_SPARABLE_MAP15) |
1759 | { | 1759 | { |
1760 | for (i=0; i<4; i++) | 1760 | for (i=0; i<4; i++) |
1761 | udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]); | 1761 | brelse(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]); |
1762 | } | 1762 | } |
1763 | } | 1763 | } |
1764 | #ifdef CONFIG_UDF_NLS | 1764 | #ifdef CONFIG_UDF_NLS |
@@ -1767,7 +1767,7 @@ udf_put_super(struct super_block *sb) | |||
1767 | #endif | 1767 | #endif |
1768 | if (!(sb->s_flags & MS_RDONLY)) | 1768 | if (!(sb->s_flags & MS_RDONLY)) |
1769 | udf_close_lvid(sb); | 1769 | udf_close_lvid(sb); |
1770 | udf_release_data(UDF_SB_LVIDBH(sb)); | 1770 | brelse(UDF_SB_LVIDBH(sb)); |
1771 | UDF_SB_FREE(sb); | 1771 | UDF_SB_FREE(sb); |
1772 | kfree(sb->s_fs_info); | 1772 | kfree(sb->s_fs_info); |
1773 | sb->s_fs_info = NULL; | 1773 | sb->s_fs_info = NULL; |
@@ -1837,7 +1837,7 @@ udf_count_free_bitmap(struct super_block *sb, struct udf_bitmap *bitmap) | |||
1837 | } | 1837 | } |
1838 | else if (ident != TAG_IDENT_SBD) | 1838 | else if (ident != TAG_IDENT_SBD) |
1839 | { | 1839 | { |
1840 | udf_release_data(bh); | 1840 | brelse(bh); |
1841 | printk(KERN_ERR "udf: udf_count_free failed\n"); | 1841 | printk(KERN_ERR "udf: udf_count_free failed\n"); |
1842 | goto out; | 1842 | goto out; |
1843 | } | 1843 | } |
@@ -1859,7 +1859,7 @@ udf_count_free_bitmap(struct super_block *sb, struct udf_bitmap *bitmap) | |||
1859 | } | 1859 | } |
1860 | if ( bytes ) | 1860 | if ( bytes ) |
1861 | { | 1861 | { |
1862 | udf_release_data(bh); | 1862 | brelse(bh); |
1863 | newblock = udf_get_lb_pblock(sb, loc, ++block); | 1863 | newblock = udf_get_lb_pblock(sb, loc, ++block); |
1864 | bh = udf_tread(sb, newblock); | 1864 | bh = udf_tread(sb, newblock); |
1865 | if (!bh) | 1865 | if (!bh) |
@@ -1871,7 +1871,7 @@ udf_count_free_bitmap(struct super_block *sb, struct udf_bitmap *bitmap) | |||
1871 | ptr = (uint8_t *)bh->b_data; | 1871 | ptr = (uint8_t *)bh->b_data; |
1872 | } | 1872 | } |
1873 | } | 1873 | } |
1874 | udf_release_data(bh); | 1874 | brelse(bh); |
1875 | 1875 | ||
1876 | out: | 1876 | out: |
1877 | unlock_kernel(); | 1877 | unlock_kernel(); |
@@ -1896,7 +1896,7 @@ udf_count_free_table(struct super_block *sb, struct inode * table) | |||
1896 | 1896 | ||
1897 | while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1) | 1897 | while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1) |
1898 | accum += (elen >> table->i_sb->s_blocksize_bits); | 1898 | accum += (elen >> table->i_sb->s_blocksize_bits); |
1899 | udf_release_data(epos.bh); | 1899 | brelse(epos.bh); |
1900 | 1900 | ||
1901 | unlock_kernel(); | 1901 | unlock_kernel(); |
1902 | 1902 | ||