Set lock-status in race.

Lock and unlock race, removed redundant code.