From 93ce6751c2d00f7a052f97c6923c0ad2267a395d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 10 Jun 2012 20:43:56 -0700 Subject: [PATCH] --- yaml --- r: 320280 b: refs/heads/master c: f3dea7edd3d449fe7a6d402c1ce56a294b985261 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ceph/ceph_common.c | 7 ------- trunk/net/ceph/mon_client.c | 8 ++++++++ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 0003d58a101d..41405df15d8b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 89a86be0ce20022f6ede8bccec078dbb3d63caaa +refs/heads/master: f3dea7edd3d449fe7a6d402c1ce56a294b985261 diff --git a/trunk/net/ceph/ceph_common.c b/trunk/net/ceph/ceph_common.c index 2de3ea1bbd64..c815f31a1a3f 100644 --- a/trunk/net/ceph/ceph_common.c +++ b/trunk/net/ceph/ceph_common.c @@ -498,13 +498,6 @@ void ceph_destroy_client(struct ceph_client *client) /* unmount */ ceph_osdc_stop(&client->osdc); - /* - * make sure osd connections close out before destroying the - * auth module, which is needed to free those connections' - * ceph_authorizers. - */ - ceph_msgr_flush(); - ceph_monc_stop(&client->monc); ceph_debugfs_client_cleanup(client); diff --git a/trunk/net/ceph/mon_client.c b/trunk/net/ceph/mon_client.c index 7a16750d62a6..dc16595d6885 100644 --- a/trunk/net/ceph/mon_client.c +++ b/trunk/net/ceph/mon_client.c @@ -838,6 +838,14 @@ void ceph_monc_stop(struct ceph_mon_client *monc) mutex_unlock(&monc->mutex); + /* + * flush msgr queue before we destroy ourselves to ensure that: + * - any work that references our embedded con is finished. + * - any osd_client or other work that may reference an authorizer + * finishes before we shut down the auth subsystem. + */ + ceph_msgr_flush(); + ceph_auth_destroy(monc->auth); ceph_msg_put(monc->m_auth);