diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 26147746c272..7f47c366bf15 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -2831,15 +2831,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
2831 | * Test whether we have more sectors than will fit in sector_t, | 2831 | * Test whether we have more sectors than will fit in sector_t, |
2832 | * and whether the max offset is addressable by the page cache. | 2832 | * and whether the max offset is addressable by the page cache. |
2833 | */ | 2833 | */ |
2834 | if ((ext4_blocks_count(es) > | 2834 | ret = generic_check_addressable(sb->s_blocksize_bits, |
2835 | (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) || | 2835 | ext4_blocks_count(es)); |
2836 | (ext4_blocks_count(es) > | 2836 | if (ret) { |
2837 | (pgoff_t)(~0ULL) >> (PAGE_CACHE_SHIFT - sb->s_blocksize_bits))) { | ||
2838 | ext4_msg(sb, KERN_ERR, "filesystem" | 2837 | ext4_msg(sb, KERN_ERR, "filesystem" |
2839 | " too large to mount safely on this system"); | 2838 | " too large to mount safely on this system"); |
2840 | if (sizeof(sector_t) < 8) | 2839 | if (sizeof(sector_t) < 8) |
2841 | ext4_msg(sb, KERN_WARNING, "CONFIG_LBDAF not enabled"); | 2840 | ext4_msg(sb, KERN_WARNING, "CONFIG_LBDAF not enabled"); |
2842 | ret = -EFBIG; | ||
2843 | goto failed_mount; | 2841 | goto failed_mount; |
2844 | } | 2842 | } |
2845 | 2843 | ||