Message ID | 4993C166.6020905@cn.fujitsu.com |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index da8bdea..36cdfd6 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -873,6 +873,14 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size); + if (blocksize < EXT2_MIN_BLOCK_SIZE || + blocksize > EXT2_MAX_BLOCK_SIZE) { + printk(KERN_ERR + "EXT2-fs: Unsupported filesystem blocksize %d on %s.\n", + blocksize, sb->s_id); + goto failed_mount; + } + if (ext2_use_xip(sb) && blocksize != PAGE_SIZE) { if (!silent) printk("XIP: Unsupported blocksize\n");