Re-reading the patch made me think: I guess there's a race opportunity, with several processes executing this code path at the same time and finding the stale lock at the same point in time.

Not sure if it's a huge deal, though.