Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) says: When someone, while in a state of janabah, washes (his head) with khitmi (marshmallow) and then performs the ritual bath after that, he may wash his head with water if he wishes.
Al-Tabarani recorded it in al-Mu'jam al-Kabir, and its chain is hasan (good).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الطهارة / 1481