]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix clang build regression
authorTheodore Ts'o <tytso@mit.edu>
Mon, 14 Aug 2017 12:29:18 +0000 (08:29 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 14 Aug 2017 12:29:18 +0000 (08:29 -0400)
commit6965717fc35fad84672a93dca2cad4f15dfb98d2
treeeac8acb2b6f91d85f762257cd944bd709ec3256b
parent7613cd8da5a8c547eec267568182d04d895b6284
ext4: fix clang build regression

Arnd Bergmann <arnd@arndb.de>

As Stefan pointed out, I misremembered what clang can do specifically,
and it turns out that the variable-length array at the end of the
structure did not work (a flexible array would have worked here
but not solved the problem):

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];

This reverts part of my previous patch, using a fixed-size array
again, but keeping the check for the array overflow.

Fixes: 882a543852a5 ("ext4: fix warning about stack corruption")
Reported-by: Stefan Agner <stefan@agner.ch>
Tested-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c