]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
isofs: handle set_blocksize failures
authorChristoph Hellwig <hch@lst.de>
Mon, 11 May 2026 07:16:52 +0000 (09:16 +0200)
committerChristian Brauner <brauner@kernel.org>
Thu, 21 May 2026 11:39:35 +0000 (13:39 +0200)
isofs 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 <hch@lst.de>
Link: https://patch.msgid.link/20260511071701.2456211-8-hch@lst.de
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/isofs/inode.c

index efee53717f1cde8f998f41278d0a9a934518b29a..337836a0a17046c7c6ec0af8068b11f3e722030a 100644 (file)
@@ -818,7 +818,8 @@ root_found:
         * entries.  By forcing the blocksize in this way, we ensure
         * that we will never be required to do this.
         */
-       sb_set_blocksize(s, orig_zonesize);
+       if (!sb_set_blocksize(s, orig_zonesize))
+               goto out_freesbi;
 
        sbi->s_nls_iocharset = NULL;