aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2013-02-05 08:08:57 -0500
committerJan Kara <jack@suse.cz>2013-02-05 11:29:52 -0500
commitc60305b578674eefe333198c7476dba2178a9082 (patch)
tree18cfda5512da015ff9d3b912f369f8987c941462 /fs/udf
parent89b1f39eb4189de745fae554b0d614d87c8d5c63 (diff)
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 <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/super.c1
-rw-r--r--fs/udf/udf_sb.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index da8ce9f14387..f8830803d389 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1023,7 +1023,6 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
1023 if (bitmap == NULL) 1023 if (bitmap == NULL)
1024 return NULL; 1024 return NULL;
1025 1025
1026 bitmap->s_block_bitmap = (struct buffer_head **)(bitmap + 1);
1027 bitmap->s_nr_groups = nr_groups; 1026 bitmap->s_nr_groups = nr_groups;
1028 return bitmap; 1027 return bitmap;
1029} 1028}
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 8d1c9d4f439e..4f7ddb796991 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -83,7 +83,7 @@ struct udf_bitmap {
83 __u32 s_extLength; 83 __u32 s_extLength;
84 __u32 s_extPosition; 84 __u32 s_extPosition;
85 int s_nr_groups; 85 int s_nr_groups;
86 struct buffer_head **s_block_bitmap; 86 struct buffer_head *s_block_bitmap[0];
87}; 87};
88 88
89struct udf_part_map { 89struct udf_part_map {