Fix some staticness warnings
Use __must_hold macro for checking locks
Fix lock unbalance