am a1d6f096: am 7e2cb84e: Modify the code to avoid potential deadlocks.

* commit 'a1d6f0960adc183d164684237c06fec8fae885d1':
  Modify the code to avoid potential deadlocks.