linux/fs/erofs
Gao Xiang a64d500b00 erofs: fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS on some UP platforms
CONFIG_NR_CPUS doesn't define on some UP platforms (e.g.  arm), so this
can cause make oldconfig to loop indefinitely when CONFIG_SMP=n:

  $ make ARCH=arm allmodconfig
  $ sed -i "/CONFIG_SMP=y/d" .config
  $ sed -i "/CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS.*/d" .config

  EROFS LZMA default maximum decompression streams (EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS) [0] (NEW)
  EROFS LZMA default maximum decompression streams (EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS) [0] (NEW)
  ...

Let's guard NR_CPUS with SMP instead of using a hardcoded arbitrary CPU
uplimit here, similar to commit a334407810 ("mm: make SPLIT_PTE_PTLOCKS
depend on SMP").

The initial report from SJ Park was for m68k [1] (m68k is the only arch
without NR_CPUS in Kconfig), and that got fixed in commit 1fd495ef09
("m68k: Define NR_CPUS to 1")

Reported-by: SJ Park <sj@kernel.org>
Link: https://lore.kernel.org/all/anuyFHLUGDjZWY4K@XiangdeMacBook-Pro.local/T/#u [1]
Closes: https://lore.kernel.org/r/20260728065447.91511-1-sj@kernel.org
Reported-by: Guenter Roeck <groeck7@gmail.com>
Closes: https://lore.kernel.org/r/87853c96-cc8f-49e6-81b1-02bfe409e372@roeck-us.net
Fixes: c9b47e6b23 ("erofs: cap LZMA stream pool size")
Signed-off-by: Gao Xiang <xiang@kernel.org>
Tested-by: SJ Park <sj@kernel.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-08-14 07:44:41 -07:00
..
compress.h erofs: enable error reporting for z_erofs_fixup_insize() 2025-11-30 23:49:32 +08:00
data.c erofs: remove fscache backend entirely 2026-06-22 11:00:06 +08:00
decompressor_crypto.c erofs: make z_erofs_crypto[] static 2026-01-23 00:00:18 +08:00
decompressor_deflate.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
decompressor_lzma.c erofs: cap LZMA stream pool size 2026-07-27 12:31:11 +08:00
decompressor_zstd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
decompressor.c erofs: error out obviously illegal extents in advance 2026-04-10 16:53:39 +08:00
dir.c erofs: fix the out-of-bounds nameoff handling for trailing dirents 2026-04-21 16:56:04 +08:00
erofs_fs.h erofs: add sparse support to pcluster layout 2026-06-22 06:48:59 +08:00
fileio.c erofs: set fileio bio failed in short read case 2026-03-17 10:27:31 +08:00
inode.c erofs: handle 48-bit blocks_hi for compressed inodes 2026-06-22 18:50:36 +08:00
internal.h erofs: ensure valid f_path for page cache sharing 2026-07-27 12:31:02 +08:00
ishare.c erofs: ensure valid f_path for page cache sharing 2026-07-27 12:31:02 +08:00
Kconfig erofs: fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS on some UP platforms 2026-08-14 07:44:41 -07:00
Makefile erofs: remove fscache backend entirely 2026-06-22 11:00:06 +08:00
namei.c erofs: get rid of erofs_kmap_type 2025-03-17 01:21:24 +08:00
super.c erofs: hide "cache_strategy=" for plain filesystems 2026-07-13 16:41:42 +08:00
sysfs.c erofs: avoid some unnecessary #ifdefs 2026-02-03 11:25:55 +08:00
xattr.c erofs: fix metabuf leak in inode xattr initialization 2026-05-20 14:53:14 +08:00
xattr.h erofs: mark inodes without acls in erofs_read_inode() 2026-01-28 15:38:37 +08:00
zdata.c erofs: remove fscache backend entirely 2026-06-22 11:00:06 +08:00
zmap.c erofs: relax sanity check for tail pclusters due to ztailpacking 2026-07-08 15:07:41 +08:00
zutil.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00