Re: [PATCH 07/10] isofs: handle set_blocksize failures

Jan Kara <[email protected]> Mon, 11 May 2026 18:10:11 +0200
Newsgroups dev.linux.lists.ntfs3,org.kernel.vger.linux-fsdevel
Message-ID <35a4jp5euneamhh6vlpppjthrfglp65m24bwmxv4hxjh6nf336@qpg7ch4i6dgf>
On Mon 11-05-26 09:16:52, Christoph Hellwig wrote:
> 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 <[email protected]>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <[email protected]>

								Honza

> ---
>  fs/isofs/inode.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
> index efee53717f1c..337836a0a170 100644
> --- a/fs/isofs/inode.c
> +++ b/fs/isofs/inode.c
> @@ -818,7 +818,8 @@ static int isofs_fill_super(struct super_block *s, struct fs_context *fc)
>  	 * 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;
>  
> -- 
> 2.53.0
> 
-- 
Jan Kara <[email protected]>
SUSE Labs, CR