Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142937
b: refs/heads/master
c: 0f2ddca
h: refs/heads/master
i:
  142935: 83b1457
v: v3
  • Loading branch information
From: Thiemo Nagel authored and Theodore Ts'o committed Apr 7, 2009
1 parent 668fe5f commit 343a557
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e44543b83bf4ab84dc6bd5b88158c78b1ed1c208
refs/heads/master: 0f2ddca66d70c8ccba7486cf2d79c6b60e777abd
9 changes: 9 additions & 0 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2508,6 +2508,15 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
if (EXT4_BLOCKS_PER_GROUP(sb) == 0)
goto cantfind_ext4;

/* check blocks count against device size */
blocks_count = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits;
if (blocks_count && ext4_blocks_count(es) > blocks_count) {
printk(KERN_WARNING "EXT4-fs: bad geometry: block count %llu "
"exceeds size of device (%llu blocks)\n",
ext4_blocks_count(es), blocks_count);
goto failed_mount;
}

/*
* It makes no sense for the first data block to be beyond the end
* of the filesystem.
Expand Down

0 comments on commit 343a557

Please sign in to comment.