Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255102
b: refs/heads/master
c: c6d5f5f
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Christoph Hellwig committed Jun 30, 2011
1 parent 2bfa1e2 commit 0e485c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ba2d5fdcfd19de0dedf394ddc48db2f219fa89a
refs/heads/master: c6d5f5fa658f2569a7baaff5acda261a1316cee9
9 changes: 9 additions & 0 deletions trunk/fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,13 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
if (!sbi->rsrc_clump_blocks)
sbi->rsrc_clump_blocks = 1;

err = generic_check_addressable(sbi->alloc_blksz_shift,
sbi->total_blocks);
if (err) {
printk(KERN_ERR "hfs: filesystem size too large.\n");
goto out_free_vhdr;
}

/* Set up operations so we can load metadata */
sb->s_op = &hfsplus_sops;
sb->s_maxbytes = MAX_LFS_FILESIZE;
Expand All @@ -417,6 +424,8 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
sb->s_flags |= MS_RDONLY;
}

err = -EINVAL;

/* Load metadata objects (B*Trees) */
sbi->ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID);
if (!sbi->ext_tree) {
Expand Down
4 changes: 0 additions & 4 deletions trunk/fs/hfsplus/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ int hfsplus_read_wrapper(struct super_block *sb)

if (hfsplus_get_last_session(sb, &part_start, &part_size))
goto out;
if ((u64)part_start + part_size > 0x100000000ULL) {
pr_err("hfs: volumes larger than 2TB are not supported yet\n");
goto out;
}

error = -ENOMEM;
sbi->s_vhdr = kmalloc(HFSPLUS_SECTOR_SIZE, GFP_KERNEL);
Expand Down

0 comments on commit 0e485c8

Please sign in to comment.