ext2: Fix fs corruption in ext2_get_xip_mem()
[pandora-kernel.git] / fs / ext2 / inode.c
index 91a6945..5a45b8f 100644 (file)
@@ -619,6 +619,8 @@ static int ext2_get_blocks(struct inode *inode,
        int count = 0;
        ext2_fsblk_t first_block = 0;
 
+       BUG_ON(maxblocks == 0);
+
        depth = ext2_block_to_path(inode,iblock,offsets,&blocks_to_boundary);
 
        if (depth == 0)