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

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