Merge tag 'for-4.20-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[linux-2.6-microblaze.git] / fs / udf / balloc.c
index fcda0fc..ec85aea 100644 (file)
@@ -175,8 +175,8 @@ static int udf_bitmap_prealloc_blocks(struct super_block *sb,
 {
        struct udf_sb_info *sbi = UDF_SB(sb);
        int alloc_count = 0;
-       int bit, block, block_group, group_start;
-       int nr_groups, bitmap_nr;
+       int bit, block, block_group;
+       int bitmap_nr;
        struct buffer_head *bh;
        __u32 part_len;
 
@@ -189,10 +189,8 @@ static int udf_bitmap_prealloc_blocks(struct super_block *sb,
                block_count = part_len - first_block;
 
        do {
-               nr_groups = udf_compute_nr_groups(sb, partition);
                block = first_block + (sizeof(struct spaceBitmapDesc) << 3);
                block_group = block >> (sb->s_blocksize_bits + 3);
-               group_start = block_group ? 0 : sizeof(struct spaceBitmapDesc);
 
                bitmap_nr = load_block_bitmap(sb, bitmap, block_group);
                if (bitmap_nr < 0)
@@ -652,12 +650,6 @@ void udf_free_blocks(struct super_block *sb, struct inode *inode,
        } else if (map->s_partition_flags & UDF_PART_FLAG_UNALLOC_TABLE) {
                udf_table_free_blocks(sb, map->s_uspace.s_table,
                                      bloc, offset, count);
-       } else if (map->s_partition_flags & UDF_PART_FLAG_FREED_BITMAP) {
-               udf_bitmap_free_blocks(sb, map->s_fspace.s_bitmap,
-                                      bloc, offset, count);
-       } else if (map->s_partition_flags & UDF_PART_FLAG_FREED_TABLE) {
-               udf_table_free_blocks(sb, map->s_fspace.s_table,
-                                     bloc, offset, count);
        }
 
        if (inode) {
@@ -684,16 +676,6 @@ inline int udf_prealloc_blocks(struct super_block *sb,
                                                      map->s_uspace.s_table,
                                                      partition, first_block,
                                                      block_count);
-       else if (map->s_partition_flags & UDF_PART_FLAG_FREED_BITMAP)
-               allocated = udf_bitmap_prealloc_blocks(sb,
-                                                      map->s_fspace.s_bitmap,
-                                                      partition, first_block,
-                                                      block_count);
-       else if (map->s_partition_flags & UDF_PART_FLAG_FREED_TABLE)
-               allocated = udf_table_prealloc_blocks(sb,
-                                                     map->s_fspace.s_table,
-                                                     partition, first_block,
-                                                     block_count);
        else
                return 0;
 
@@ -717,14 +699,6 @@ inline udf_pblk_t udf_new_block(struct super_block *sb,
                block = udf_table_new_block(sb,
                                            map->s_uspace.s_table,
                                            partition, goal, err);
-       else if (map->s_partition_flags & UDF_PART_FLAG_FREED_BITMAP)
-               block = udf_bitmap_new_block(sb,
-                                            map->s_fspace.s_bitmap,
-                                            partition, goal, err);
-       else if (map->s_partition_flags & UDF_PART_FLAG_FREED_TABLE)
-               block = udf_table_new_block(sb,
-                                           map->s_fspace.s_table,
-                                           partition, goal, err);
        else {
                *err = -EIO;
                return 0;