Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263837
b: refs/heads/master
c: f1fcd9f
h: refs/heads/master
i:
  263835: f26b6d5
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Sep 15, 2011
1 parent 93ca2f6 commit 98083f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: f588c960fcaa6fa8bf82930bb819c9aca4eb9347
refs/heads/master: f1fcd9f0e96d12498afb5543107f560f196cfcf3
11 changes: 8 additions & 3 deletions trunk/fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
struct inode *root, *inode;
struct qstr str;
struct nls_table *nls = NULL;
u64 last_fs_block, last_fs_page;
int err;

err = -EINVAL;
Expand Down Expand Up @@ -399,9 +400,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) {
err = -EFBIG;
last_fs_block = sbi->total_blocks - 1;
last_fs_page = (last_fs_block << sbi->alloc_blksz_shift) >>
PAGE_CACHE_SHIFT;

if ((last_fs_block > (sector_t)(~0ULL) >> (sbi->alloc_blksz_shift - 9)) ||
(last_fs_page > (pgoff_t)(~0ULL))) {
printk(KERN_ERR "hfs: filesystem size too large.\n");
goto out_free_vhdr;
}
Expand Down

0 comments on commit 98083f3

Please sign in to comment.