lock before search in do_open