[PATCH 4.14 014/146] libceph: factor out __prepare_write_connect()