Mucus forms a protective lining on the inner wall of the stomach. It means it protects the wall of the stomach from the corrosive effect of hydrochloric acid and proteolytic nature of pepsin.