On polynomial-time solvable linear Diophantine problems