aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/hfsplus/super.c9
-rw-r--r--fs/hfsplus/wrapper.c4
2 files changed, 9 insertions, 4 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 84a47b709f51..acaef57e3606 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -393,6 +393,13 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
393 if (!sbi->rsrc_clump_blocks) 393 if (!sbi->rsrc_clump_blocks)
394 sbi->rsrc_clump_blocks = 1; 394 sbi->rsrc_clump_blocks = 1;
395 395
396 err = generic_check_addressable(sbi->alloc_blksz_shift,
397 sbi->total_blocks);
398 if (err) {
399 printk(KERN_ERR "hfs: filesystem size too large.\n");
400 goto out_free_vhdr;
401 }
402
396 /* Set up operations so we can load metadata */ 403 /* Set up operations so we can load metadata */
397 sb->s_op = &hfsplus_sops; 404 sb->s_op = &hfsplus_sops;
398 sb->s_maxbytes = MAX_LFS_FILESIZE; 405 sb->s_maxbytes = MAX_LFS_FILESIZE;
@@ -417,6 +424,8 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
417 sb->s_flags |= MS_RDONLY; 424 sb->s_flags |= MS_RDONLY;
418 } 425 }
419 426
427 err = -EINVAL;
428
420 /* Load metadata objects (B*Trees) */ 429 /* Load metadata objects (B*Trees) */
421 sbi->ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID); 430 sbi->ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID);
422 if (!sbi->ext_tree) { 431 if (!sbi->ext_tree) {
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 4b86468125c1..2f933e83f5c5 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -141,10 +141,6 @@ int hfsplus_read_wrapper(struct super_block *sb)
141 141
142 if (hfsplus_get_last_session(sb, &part_start, &part_size)) 142 if (hfsplus_get_last_session(sb, &part_start, &part_size))
143 goto out; 143 goto out;
144 if ((u64)part_start + part_size > 0x100000000ULL) {
145 pr_err("hfs: volumes larger than 2TB are not supported yet\n");
146 goto out;
147 }
148 144
149 error = -ENOMEM; 145 error = -ENOMEM;
150 sbi->s_vhdr = kmalloc(HFSPLUS_SECTOR_SIZE, GFP_KERNEL); 146 sbi->s_vhdr = kmalloc(HFSPLUS_SECTOR_SIZE, GFP_KERNEL);