You'll have to paper file.
The IRS will kick out an automated computer letter and a 1040X to both of you offering to allow one of you to correct the discrepancy. If neither of you do in the time alloted, they'll start to figure out which of you is the one who is responsible for erroneously declaring the exemption.
Did you contact your ex about why he did that?