From 4ba897bc73e2085fc933ab92d0f1950b2080ec1b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 10 Jun 2012 20:43:56 -0700 Subject: [PATCH] --- yaml --- r: 311212 b: refs/heads/master c: 642c0dbde32f34baa7886e988a067089992adc8f 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 601065dd67ec..e50c5374823f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b132cf4c733f91bb4dd2277ea049243cf16e8b66 +refs/heads/master: 642c0dbde32f34baa7886e988a067089992adc8f diff --git a/trunk/net/ceph/ceph_common.c b/trunk/net/ceph/ceph_common.c index a776f751edbf..ba4323bce0e9 100644 --- a/trunk/net/ceph/ceph_common.c +++ b/trunk/net/ceph/ceph_common.c @@ -504,13 +504,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 10d6008d31f2..d0649a9655be 100644 --- a/trunk/net/ceph/mon_client.c +++ b/trunk/net/ceph/mon_client.c @@ -847,6 +847,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);