msgr/async: fix unsafe access in unregister_conn()
We were looking at anon_conns and accepting_conns without holding
the lock (deleted_lock is not sufficient).
Drop this test, and move the decrements:
- inc when we add to conns or anon_conns (no changes there)
- dec when we remove from deleted_conns (several different paths!)
Fixes: https://tracker.ceph.com/issues/49237
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit
d51d80b3234e17690061f65dc7e1515f4244a5a3)
Signed-off-by: Gerald Yang <gerald.yang.tw@gmail.com>