From: Christoph Hellwig Date: Mon, 11 May 2026 07:16:49 +0000 (+0200) Subject: jfs: handle set_blocksize failures X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=05107f5602751fcfd3d108c1f579eb45aabead52;p=thirdparty%2Fkernel%2Flinux.git jfs: handle set_blocksize failures jfs uses buffer_heads, which don't handle block size > PAGE_SIZE well. Without this, mounting we will hit the BUG_ON(offset >= folio_size(folio)); in folio_set_bh on the first __bread_gfp call. Signed-off-by: Christoph Hellwig Link: https://patch.msgid.link/20260511071701.2456211-5-hch@lst.de Signed-off-by: Christian Brauner (Amutable) --- diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 61575f7397aea..8180d83d33fed 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -491,7 +491,8 @@ static int jfs_fill_super(struct super_block *sb, struct fs_context *fc) /* * Initialize blocksize to 4K. */ - sb_set_blocksize(sb, PSIZE); + if (!sb_set_blocksize(sb, PSIZE)) + goto out_unload; /* * Set method vectors.