Sahih Muslim Book 4, Hadith Number 1125.

Chapter : It is forbidden to remove pebbles and smooth the ground while engaged in prayer.

Shu’ba reported: I asked Qatada about spitting, in the mosque. He said: I heard Anas b. Malik say: I heard the Messenger of Allah (may peace be upon him) say: Spitting in the mosque is a sin, and its expiation is that it should be buried.