ext2: Fix fs corruption in ext2_get_xip_mem()
[pandora-kernel.git] / fs / ext2 / inode.c
index c260de6..8a33764 100644 (file)
@@ -632,6 +632,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)