Skip to content

Commit

Permalink
Use a zero sized array for raw field in struct fid
Browse files Browse the repository at this point in the history
The raw field's size can vary so we use a zero sized array since
gcc will not allow a variable sized array inside a union. This
has been tested with ext3 and gfs2 and relates to the bug
report: http://lkml.org/lkml/2007/10/24/374 and discussion
thread: http://lkml.org/lkml/2008/4/7/65

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Steven Whitehouse authored and J. Bruce Fields committed Apr 23, 2008
1 parent ff7d975 commit 9078dc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/exportfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct fid {
u32 parent_ino;
u32 parent_gen;
} i32;
__u32 raw[6];
__u32 raw[0];
};
};

Expand Down

0 comments on commit 9078dc0

Please sign in to comment.