ceph: call ceph_mdsc_destroy from destroy_fs_client
diff mbox series

Message ID 20190912121349.16056-1-jlayton@kernel.org
State New
Headers show
Series
  • ceph: call ceph_mdsc_destroy from destroy_fs_client
Related show

Commit Message

Jeff Layton Sept. 12, 2019, 12:13 p.m. UTC
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.

Patch
diff mbox series

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index cbee5dff3d87..bea6f053f999 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -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);
 }