The source resistors act as feedback to the mosfets by sampling current and feeding back voltage to the source of the transistor. This will decrease the gain (in this case, the transconductance of the transistors) and will linearize the gain (if the resistors are more linear than the transconductance of the transistor, which is usually the case, and are properly sized in relation to the transconductance of the transistors).
If Gm1 is the transconductance without the resistor, R is the resistor value, then the resulting transconductance will be Gm1/(1+Gm1*R).
As long as 1/Gm1 < R, the transconductance will be close to 1/R, and will be roughly independant of Gm1, so nonlinearities in Gm1 will not produce significant nonlinearities in the effective transconductance (and, thus gain...)