[PATCH 2/3] udf: Make s_block_bitmap standard array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 fs/udf/super.c  |    1 -
 fs/udf/udf_sb.h |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index da8ce9f..f883080 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)
 	if (bitmap == NULL)
 		return NULL;
 
-	bitmap->s_block_bitmap = (struct buffer_head **)(bitmap + 1);
 	bitmap->s_nr_groups = nr_groups;
 	return bitmap;
 }
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 8d1c9d4..4f7ddb7 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -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 {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux