From: Christoph Hellwig Date: Mon, 11 May 2026 07:16:48 +0000 (+0200) Subject: qnx4: handle set_blocksize failures X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=c7d911ea1cc9a63b07e52f5e75b263be0615b289;p=thirdparty%2Fkernel%2Flinux.git qnx4: handle set_blocksize failures qnx4 uses buffer_heads, which don't handle block size > PAGE_SIZE well. Without this, mounting 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-4-hch@lst.de Acked-by: Anders Larsen Signed-off-by: Christian Brauner (Amutable) --- diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 4deb0eeadbdef..42fcd500fad21 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c @@ -202,7 +202,8 @@ static int qnx4_fill_super(struct super_block *s, struct fs_context *fc) return -ENOMEM; s->s_fs_info = qs; - sb_set_blocksize(s, QNX4_BLOCK_SIZE); + if (!sb_set_blocksize(s, QNX4_BLOCK_SIZE)) + return -EINVAL; s->s_op = &qnx4_sops; s->s_magic = QNX4_SUPER_MAGIC;