|
@@ -290,12 +290,8 @@ static void udf_free_partition(struct udf_part_map *map)
|
|
|
|
|
|
if (map->s_partition_flags & UDF_PART_FLAG_UNALLOC_TABLE)
|
|
|
iput(map->s_uspace.s_table);
|
|
|
- if (map->s_partition_flags & UDF_PART_FLAG_FREED_TABLE)
|
|
|
- iput(map->s_fspace.s_table);
|
|
|
if (map->s_partition_flags & UDF_PART_FLAG_UNALLOC_BITMAP)
|
|
|
udf_sb_free_bitmap(map->s_uspace.s_bitmap);
|
|
|
- if (map->s_partition_flags & UDF_PART_FLAG_FREED_BITMAP)
|
|
|
- udf_sb_free_bitmap(map->s_fspace.s_bitmap);
|
|
|
if (map->s_partition_type == UDF_SPARABLE_MAP15)
|
|
|
for (i = 0; i < 4; i++)
|
|
|
brelse(map->s_type_specific.s_sparing.s_spar_map[i]);
|
|
@@ -1105,37 +1101,6 @@ static int udf_fill_partdesc_info(struct super_block *sb,
|
|
|
p_index, bitmap->s_extPosition);
|
|
|
}
|
|
|
|
|
|
- if (phd->freedSpaceTable.extLength) {
|
|
|
- struct kernel_lb_addr loc = {
|
|
|
- .logicalBlockNum = le32_to_cpu(
|
|
|
- phd->freedSpaceTable.extPosition),
|
|
|
- .partitionReferenceNum = p_index,
|
|
|
- };
|
|
|
- struct inode *inode;
|
|
|
-
|
|
|
- inode = udf_iget_special(sb, &loc);
|
|
|
- if (IS_ERR(inode)) {
|
|
|
- udf_debug("cannot load freedSpaceTable (part %d)\n",
|
|
|
- p_index);
|
|
|
- return PTR_ERR(inode);
|
|
|
- }
|
|
|
- map->s_fspace.s_table = inode;
|
|
|
- map->s_partition_flags |= UDF_PART_FLAG_FREED_TABLE;
|
|
|
- udf_debug("freedSpaceTable (part %d) @ %lu\n",
|
|
|
- p_index, map->s_fspace.s_table->i_ino);
|
|
|
- }
|
|
|
-
|
|
|
- if (phd->freedSpaceBitmap.extLength) {
|
|
|
- struct udf_bitmap *bitmap = udf_sb_alloc_bitmap(sb, p_index);
|
|
|
- if (!bitmap)
|
|
|
- return -ENOMEM;
|
|
|
- map->s_fspace.s_bitmap = bitmap;
|
|
|
- bitmap->s_extPosition = le32_to_cpu(
|
|
|
- phd->freedSpaceBitmap.extPosition);
|
|
|
- map->s_partition_flags |= UDF_PART_FLAG_FREED_BITMAP;
|
|
|
- udf_debug("freedSpaceBitmap (part %d) @ %u\n",
|
|
|
- p_index, bitmap->s_extPosition);
|
|
|
- }
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -2490,10 +2455,6 @@ static unsigned int udf_count_free(struct super_block *sb)
|
|
|
accum += udf_count_free_bitmap(sb,
|
|
|
map->s_uspace.s_bitmap);
|
|
|
}
|
|
|
- if (map->s_partition_flags & UDF_PART_FLAG_FREED_BITMAP) {
|
|
|
- accum += udf_count_free_bitmap(sb,
|
|
|
- map->s_fspace.s_bitmap);
|
|
|
- }
|
|
|
if (accum)
|
|
|
return accum;
|
|
|
|
|
@@ -2501,11 +2462,6 @@ static unsigned int udf_count_free(struct super_block *sb)
|
|
|
accum += udf_count_free_table(sb,
|
|
|
map->s_uspace.s_table);
|
|
|
}
|
|
|
- if (map->s_partition_flags & UDF_PART_FLAG_FREED_TABLE) {
|
|
|
- accum += udf_count_free_table(sb,
|
|
|
- map->s_fspace.s_table);
|
|
|
- }
|
|
|
-
|
|
|
return accum;
|
|
|
}
|
|
|
|