Skip to content

Commit 4eec7fa

Browse files
groecktorvalds
authored andcommitted
fs: ntfs: Limit NTFS_RW to page sizes smaller than 64k
NTFS_RW code allocates page size dependent arrays on the stack. This results in build failures if the page size is 64k or larger. fs/ntfs/aops.c: In function 'ntfs_write_mst_block': fs/ntfs/aops.c:1311:1: error: the frame size of 2240 bytes is larger than 2048 bytes Since commit f22969a ("powerpc/64s: Default to 64K pages for 64 bit book3s") this affects ppc:allmodconfig builds, but other architectures supporting page sizes of 64k or larger are also affected. Increasing the maximum frame size for affected architectures just to silence this error does not really help. The frame size would have to be set to a really large value for 256k pages. Also, a large frame size could potentially result in stack overruns in this code and elsewhere and is therefore not desirable. Make NTFS_RW dependent on page sizes smaller than 64k instead. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: Anton Altaparmakov <anton@tuxera.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1f0e290 commit 4eec7fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/ntfs/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ config NTFS_DEBUG
5252
config NTFS_RW
5353
bool "NTFS write support"
5454
depends on NTFS_FS
55+
depends on PAGE_SIZE_LESS_THAN_64KB
5556
help
5657
This enables the partial, but safe, write support in the NTFS driver.
5758

0 commit comments

Comments
 (0)