[PATCH 4.9 51/61] libceph: validate con->state at the top of try_write()