@@ -673,6 +673,7 @@ static void destroy_fs_client(struct ceph_fs_client *fsc)
{
dout("destroy_fs_client %p\n", fsc);
+ ceph_mdsc_destroy(fsc);
destroy_workqueue(fsc->inode_wq);
destroy_workqueue(fsc->cap_wq);
@@ -1062,10 +1063,8 @@ static void ceph_free_fc(struct fs_context *fc)
struct ceph_config_context *ctx = fc->fs_private;
struct ceph_fs_client *fsc = fc->s_fs_info;
- if (fsc) {
- ceph_mdsc_destroy(fsc);
+ if (fsc)
destroy_fs_client(fsc);
- }
if (ctx) {
destroy_mount_options(ctx->mount_options);
@@ -1148,8 +1147,6 @@ static void ceph_kill_sb(struct super_block *s)
ceph_fscache_unregister_fs(fsc);
- ceph_mdsc_destroy(fsc);
-
destroy_fs_client(fsc);
free_anon_bdev(dev);
}
They're always called in succession. Signed-off-by: Jeff Layton <jlayton@kernel.org> --- fs/ceph/super.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) Note that this is based on top of the mount API rework patch in testing.