X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fudf%2Fpartition.c;h=467a26171cd96e547d8f50c464727ff9e5afade5;hb=refs%2Fheads%2Fvserver;hp=e182fb8a8231367f33f3556f97d321c4e343ad06;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/udf/partition.c b/fs/udf/partition.c index e182fb8a8..467a26171 100644 --- a/fs/udf/partition.c +++ b/fs/udf/partition.c @@ -4,11 +4,6 @@ * PURPOSE * Partition handling routines for the OSTA-UDF(tm) filesystem. * - * CONTACTS - * E-mail regarding any portion of the Linux UDF file system should be - * directed to the development team mailing list (run by majordomo): - * linux_udf@hpesjro.fc.hp.com - * * COPYRIGHT * This file is distributed under the terms of the GNU General Public * License (GPL). Copies of the GPL can be obtained from: @@ -84,9 +79,9 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block, uint16_t return 0xFFFFFFFF; } - loc = le32_to_cpu(((uint32_t *)bh->b_data)[index]); + loc = le32_to_cpu(((__le32 *)bh->b_data)[index]); - udf_release_data(bh); + brelse(bh); if (UDF_I_LOCATION(UDF_SB_VAT(sb)).partitionReferenceNum == partition) { @@ -119,7 +114,7 @@ uint32_t udf_get_pblock_spar15(struct super_block *sb, uint32_t block, uint16_t if (st) { - for (i=0; ireallocationTableLen; i++) + for (i=0; ireallocationTableLen); i++) { if (le32_to_cpu(st->mapEntry[i].origLocation) >= 0xFFFFFFF0) break; @@ -163,7 +158,7 @@ int udf_relocate_blocks(struct super_block *sb, long old_block, long *new_block) if (!st) return 1; - for (k=0; kreallocationTableLen; k++) + for (k=0; kreallocationTableLen); k++) { if (le32_to_cpu(st->mapEntry[k].origLocation) == 0xFFFFFFFF) { @@ -173,7 +168,7 @@ int udf_relocate_blocks(struct super_block *sb, long old_block, long *new_block) { st = (struct sparingTable *)sdata->s_spar_map[j]->b_data; st->mapEntry[k].origLocation = cpu_to_le32(packet); - udf_update_tag((char *)st, sizeof(struct sparingTable) + st->reallocationTableLen * sizeof(struct sparingEntry)); + udf_update_tag((char *)st, sizeof(struct sparingTable) + le16_to_cpu(st->reallocationTableLen) * sizeof(struct sparingEntry)); mark_buffer_dirty(sdata->s_spar_map[j]); } } @@ -190,7 +185,7 @@ int udf_relocate_blocks(struct super_block *sb, long old_block, long *new_block) else if (le32_to_cpu(st->mapEntry[k].origLocation) > packet) break; } - for (l=k; lreallocationTableLen; l++) + for (l=k; lreallocationTableLen); l++) { if (le32_to_cpu(st->mapEntry[l].origLocation) == 0xFFFFFFFF) { @@ -203,7 +198,7 @@ int udf_relocate_blocks(struct super_block *sb, long old_block, long *new_block) mapEntry.origLocation = cpu_to_le32(packet); memmove(&st->mapEntry[k+1], &st->mapEntry[k], (l-k)*sizeof(struct sparingEntry)); st->mapEntry[k] = mapEntry; - udf_update_tag((char *)st, sizeof(struct sparingTable) + st->reallocationTableLen * sizeof(struct sparingEntry)); + udf_update_tag((char *)st, sizeof(struct sparingTable) + le16_to_cpu(st->reallocationTableLen) * sizeof(struct sparingEntry)); mark_buffer_dirty(sdata->s_spar_map[j]); } }