aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-07-08 08:35:50 -0400
committerChristoph Hellwig <hch@lst.de>2011-07-08 08:35:50 -0400
commit3ed8638f8867b4d0df1ec606231a087ff06c4a59 (patch)
tree17afe7f78f2d32e96eb5f7697b9a4db6c5796e7e
parent0ba9cd84ef2af58645333a86f9c901684ab1fef6 (diff)
xfs: cleanup the definition of struct xfs_dir2_data_entry
Remove the tag member which is at a variable offset after the actual name, and make name a real variable sized C99 array instead of the incorrect one-sized array which confuses (not only) gcc. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
-rw-r--r--fs/xfs/xfs_dir2_data.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/xfs_dir2_data.h b/fs/xfs/xfs_dir2_data.h
index ca02cc71e234..c50512584ebf 100644
--- a/fs/xfs/xfs_dir2_data.h
+++ b/fs/xfs/xfs_dir2_data.h
@@ -98,14 +98,15 @@ typedef struct xfs_dir2_data_hdr {
98 98
99/* 99/*
100 * Active entry in a data block. Aligned to 8 bytes. 100 * Active entry in a data block. Aligned to 8 bytes.
101 * Tag appears as the last 2 bytes. 101 *
102 * After the variable length name field there is a 2 byte tag field, which
103 * can be accessed using xfs_dir2_data_entry_tag_p.
102 */ 104 */
103typedef struct xfs_dir2_data_entry { 105typedef struct xfs_dir2_data_entry {
104 __be64 inumber; /* inode number */ 106 __be64 inumber; /* inode number */
105 __u8 namelen; /* name length */ 107 __u8 namelen; /* name length */
106 __u8 name[1]; /* name bytes, no null */ 108 __u8 name[]; /* name bytes, no null */
107 /* variable offset */ 109 /* __be16 tag; */ /* starting offset of us */
108 __be16 tag; /* starting offset of us */
109} xfs_dir2_data_entry_t; 110} xfs_dir2_data_entry_t;
110 111
111/* 112/*