Added 2 args to do_hard_links() so that it can call maybe_send_keepalive().