Later that year, Emperor Yang of Sui sent the official Liu Ziyi () to attack Cao, and Cao was killed by an arrow in battle. Lin took over Cao's troops and battled Liu at Lake Poyang, killing Liu in battle.
In the subsequent months, Emperor Yang of Sui sent the official Liu Ziyi () to confront Cao, who was struck down with an arrow during combat. Lin then assumed command of Cao's forces and engaged Liu at Lake Poyang, ultimately defeating him on the battlefield.