]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ceph/super.c
ceph: close out mds, osd connections before stopping auth
[net-next-2.6.git] / fs / ceph / super.c
index 9b46bb951e1f56c71bf539f4850911ac63facc17..5cf6fba8b705f8da50499d3436795e4558fe5395 100644 (file)
@@ -669,9 +669,17 @@ static void ceph_destroy_client(struct ceph_client *client)
 
        /* unmount */
        ceph_mdsc_stop(&client->mdsc);
-       ceph_monc_stop(&client->monc);
        ceph_osdc_stop(&client->osdc);
 
+       /*
+        * make sure mds and 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_adjust_min_caps(-client->min_caps);
 
        ceph_debugfs_client_cleanup(client);