]> Pileus Git - ~andy/linux/commitdiff
udf: Make s_block_bitmap standard array
authorJan Kara <jack@suse.cz>
Tue, 5 Feb 2013 13:08:57 +0000 (14:08 +0100)
committerJan Kara <jack@suse.cz>
Tue, 5 Feb 2013 16:29:52 +0000 (17:29 +0100)
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 <jack@suse.cz>
fs/udf/super.c
fs/udf/udf_sb.h

index da8ce9f14387aab98fbdc8f6c3048b66d48bdc61..f8830803d389276ef1600eb43ab99d6824bb795d 100644 (file)
@@ -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;
 }
index 8d1c9d4f439ee83395e7114e19248750f688fbf5..4f7ddb796991dcfc4658af5c2b65eb71beb838d8 100644 (file)
@@ -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 {