xfs: Fix xfs_attr_leafblock definition
authorJan Kara <jack@suse.com>
Wed, 19 Aug 2015 00:34:32 +0000 (10:34 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 19 Aug 2015 00:34:32 +0000 (10:34 +1000)
commitffeecc5213024ae663377b442eedcfbacf6d0c5d
treeab9bf3438de660d09936687a1fc3ed449b42f734
parent2f123bce18943fff819bc10f8868ffb9149fc622
xfs: Fix xfs_attr_leafblock definition

struct xfs_attr_leafblock contains 'entries' array which is declared
with size 1 altough it can in fact contain much more entries. Since this
array is followed by further struct members, gcc (at least in version
4.8.3) thinks that the array has the fixed size of 1 element and thus
may optimize away all accesses beyond the end of array resulting in
non-working code. This problem was only observed with userspace code in
xfsprogs, however it's better to be safe in kernel as well and have
matching kernel and xfsprogs definitions.

cc: <stable@vger.kernel.org>
Signed-off-by: Jan Kara <jack@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_da_format.h