The foreskin protects the glans penis when the penis is not erect . Most mammals have foreskin . Gairdner ( 1949 ) states that the foreskin protects the glans but some studies show that inflammation of the glans is more common when the foreskin is present .