[PATCH] merge locate_fd() and get_unused_fd()