ext3/ext4: Factor out disk addressability check
[deliverable/linux.git] / fs / ext3 / super.c
index 5dbf4dba03c4d99240edd76de5e9a0a2bba4bd04..a367dd04428070cde6fbf7c70bbd64754ce498db 100644 (file)
@@ -1849,8 +1849,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
                goto failed_mount;
        }
 
-       if (le32_to_cpu(es->s_blocks_count) >
-                   (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
+       if (generic_check_addressable(sb->s_blocksize_bits,
+                                     le32_to_cpu(es->s_blocks_count))) {
                ext3_msg(sb, KERN_ERR,
                        "error: filesystem is too large to mount safely");
                if (sizeof(sector_t) < 8)
This page took 0.035954 seconds and 5 git commands to generate.