Linear deformation problems for the Ernst equation