The cell membrane and cell wall function to regulate what passes in and out of cells. The cell membrane is a lipid bilayer with proteins that acts as a selective barrier through passive diffusion and active transport. The cell wall provides additional support and protection for plant, fungi and bacteria cells. Osmosis allows for diffusion of water across the cell membrane to equalize concentrations. Cystic fibrosis is caused by a mutation impairing proper ion transport across cell membranes, resulting in thick mucus buildup.