mlock: fix mlock count can not decrease in race condition