[PATCH 4.9 051/101] libceph: factor out __prepare_write_connect()