mirror of https://gitee.com/openkylin/linux.git
ceph: use kill_anon_super helper
ceph open-codes this around some other activity and the rationale for it isn't clear. There is no need to delay free_anon_bdev until the end of kill_sb. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
1dd8d47081
commit
470a5c77ea
|
@ -1205,14 +1205,13 @@ static int ceph_init_fs_context(struct fs_context *fc)
|
||||||
static void ceph_kill_sb(struct super_block *s)
|
static void ceph_kill_sb(struct super_block *s)
|
||||||
{
|
{
|
||||||
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
|
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
|
||||||
dev_t dev = s->s_dev;
|
|
||||||
|
|
||||||
dout("kill_sb %p\n", s);
|
dout("kill_sb %p\n", s);
|
||||||
|
|
||||||
ceph_mdsc_pre_umount(fsc->mdsc);
|
ceph_mdsc_pre_umount(fsc->mdsc);
|
||||||
flush_fs_workqueues(fsc);
|
flush_fs_workqueues(fsc);
|
||||||
|
|
||||||
generic_shutdown_super(s);
|
kill_anon_super(s);
|
||||||
|
|
||||||
fsc->client->extra_mon_dispatch = NULL;
|
fsc->client->extra_mon_dispatch = NULL;
|
||||||
ceph_fs_debugfs_cleanup(fsc);
|
ceph_fs_debugfs_cleanup(fsc);
|
||||||
|
@ -1220,7 +1219,6 @@ static void ceph_kill_sb(struct super_block *s)
|
||||||
ceph_fscache_unregister_fs(fsc);
|
ceph_fscache_unregister_fs(fsc);
|
||||||
|
|
||||||
destroy_fs_client(fsc);
|
destroy_fs_client(fsc);
|
||||||
free_anon_bdev(dev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_system_type ceph_fs_type = {
|
static struct file_system_type ceph_fs_type = {
|
||||||
|
|
Loading…
Reference in New Issue