check_locking: move to the new function hook.