Kink walls and critical behavior of magnetization near the lock-in transition in layered superconductors.