Skip to content

Commit c60305b

Browse files
committed
udf: Make s_block_bitmap standard array
struct udf_bitmap has array of buffer pointers attached to it. The code unnecessarily used s_block_bitmap as a pointer to the array instead of the standard trick of using 0 length array in the declaration. Change that to make code more readable and actually shrink the structure by one pointer. Signed-off-by: Jan Kara <[email protected]>
1 parent 89b1f39 commit c60305b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

fs/udf/super.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,6 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
10231023
if (bitmap == NULL)
10241024
return NULL;
10251025

1026-
bitmap->s_block_bitmap = (struct buffer_head **)(bitmap + 1);
10271026
bitmap->s_nr_groups = nr_groups;
10281027
return bitmap;
10291028
}

fs/udf/udf_sb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct udf_bitmap {
8383
__u32 s_extLength;
8484
__u32 s_extPosition;
8585
int s_nr_groups;
86-
struct buffer_head **s_block_bitmap;
86+
struct buffer_head *s_block_bitmap[0];
8787
};
8888

8989
struct udf_part_map {

0 commit comments

Comments
 (0)