Remove dh_open_locked() and replace it with openat_locked()