lock_any_ref_for_update(): inline function