Emission of maniy whilst doing ghusl must be one of two things:
-It happened with desire or
-It happened without desire.
If it happened with desire, then this invalidates the first ghusl. So if he had washed his head and part of his body, then maniy was emitted with desire, that invalidates his previous ghusl and he has to repeat what he had already washed.
It says in al-Mawsoo‘ah al-Fiqhiyyah (5/220): The fuqaha’ are unanimously agreed that emission of maniy is one of the things that make ghusl obligatory. In fact, an-Nawawi narrated that there was consensus on this point.
But if it happens without desire, and it is just the remnants of the first emission, this invalidates wudoo’, but he does not have to repeat what he has done of ghusl. See the answer to question no. 49693.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: With regard to this questioner who emitted it, if there was no desire that led to its emission, then it is the remnants of the first episode of janaabah, and does not necessitate ghusl. All he has to do is wash it off and wash everything it got onto, and repeat wudoo’ only.
End quote from Fataawa Noor ‘ala’d-Darb
And Allah knows best.