ext4: avoid variable size array in structs armv7-master-clang-v4.13-rc4
authorStefan Agner <stefan@agner.ch>
Mon, 7 Aug 2017 07:03:10 +0000 (00:03 -0700)
committerStefan Agner <stefan@agner.ch>
Mon, 7 Aug 2017 07:03:10 +0000 (00:03 -0700)
commite9ad97b48625cbb1868d4b7b8e7a9ec403d9345e
tree945e42428814e0e899cf4fc954b6821f048aaca7
parentdb31316046267ce91ae8bd80e7b9d40bcd121ebb
ext4: avoid variable size array in structs

Clang does not support variable length array in structure, even
if the array is at the very end. Avoid variable sized array by
using the maximum length again. This fixes clang build error:

fs/ext4/mballoc.c:2303:17: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
                ext4_grpblk_t counters[blocksize_bits + 2];

Fixes: 2df2c3402fc8 ("ext4: fix warning about stack corruption")
Signed-off-by: Stefan Agner <stefan@agner.ch>
fs/ext4/mballoc.c