Get rid of unneeded lock calls.