Skip to content

Commit

Permalink
udf: Make s_block_bitmap standard array
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jankara committed Feb 5, 2013
1 parent 89b1f39 commit c60305b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion fs/udf/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,6 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
if (bitmap == NULL)
return NULL;

bitmap->s_block_bitmap = (struct buffer_head **)(bitmap + 1);
bitmap->s_nr_groups = nr_groups;
return bitmap;
}
Expand Down
2 changes: 1 addition & 1 deletion fs/udf/udf_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct udf_bitmap {
__u32 s_extLength;
__u32 s_extPosition;
int s_nr_groups;
struct buffer_head **s_block_bitmap;
struct buffer_head *s_block_bitmap[0];
};

struct udf_part_map {
Expand Down

0 comments on commit c60305b

Please sign in to comment.