diff options
| -rw-r--r-- | fs/ext2/inode.c | 2 | ||||
| -rw-r--r-- | fs/ext2/xip.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index c260de6d7b6d..8a337640a46a 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
| @@ -632,6 +632,8 @@ static int ext2_get_blocks(struct inode *inode, | |||
| 632 | int count = 0; | 632 | int count = 0; |
| 633 | ext2_fsblk_t first_block = 0; | 633 | ext2_fsblk_t first_block = 0; |
| 634 | 634 | ||
| 635 | BUG_ON(maxblocks == 0); | ||
| 636 | |||
| 635 | depth = ext2_block_to_path(inode,iblock,offsets,&blocks_to_boundary); | 637 | depth = ext2_block_to_path(inode,iblock,offsets,&blocks_to_boundary); |
| 636 | 638 | ||
| 637 | if (depth == 0) | 639 | if (depth == 0) |
diff --git a/fs/ext2/xip.c b/fs/ext2/xip.c index 1c3312858fcf..e98171a11cfe 100644 --- a/fs/ext2/xip.c +++ b/fs/ext2/xip.c | |||
| @@ -35,6 +35,7 @@ __ext2_get_block(struct inode *inode, pgoff_t pgoff, int create, | |||
| 35 | int rc; | 35 | int rc; |
| 36 | 36 | ||
| 37 | memset(&tmp, 0, sizeof(struct buffer_head)); | 37 | memset(&tmp, 0, sizeof(struct buffer_head)); |
| 38 | tmp.b_size = 1 << inode->i_blkbits; | ||
| 38 | rc = ext2_get_block(inode, pgoff, &tmp, create); | 39 | rc = ext2_get_block(inode, pgoff, &tmp, create); |
| 39 | *result = tmp.b_blocknr; | 40 | *result = tmp.b_blocknr; |
| 40 | 41 | ||
