Skip to content

Commit e4d2750

Browse files
Christoph Hellwigaxboe
authored andcommitted
ceph: remove call to bdi_unregister
bdi_destroy already does all the work, and if we delay freeing the anon bdev we can get away with just that single call. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent b83ae6d commit e4d2750

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

fs/ceph/super.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@ static void ceph_put_super(struct super_block *s)
4040

4141
dout("put_super\n");
4242
ceph_mdsc_close_sessions(fsc->mdsc);
43-
44-
/*
45-
* ensure we release the bdi before put_anon_super releases
46-
* the device name.
47-
*/
48-
if (s->s_bdi == &fsc->backing_dev_info) {
49-
bdi_unregister(&fsc->backing_dev_info);
50-
s->s_bdi = NULL;
51-
}
52-
53-
return;
5443
}
5544

5645
static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -1002,11 +991,16 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type,
1002991
static void ceph_kill_sb(struct super_block *s)
1003992
{
1004993
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
994+
dev_t dev = s->s_dev;
995+
1005996
dout("kill_sb %p\n", s);
997+
1006998
ceph_mdsc_pre_umount(fsc->mdsc);
1007-
kill_anon_super(s); /* will call put_super after sb is r/o */
999+
generic_shutdown_super(s);
10081000
ceph_mdsc_destroy(fsc);
1001+
10091002
destroy_fs_client(fsc);
1003+
free_anon_bdev(dev);
10101004
}
10111005

10121006
static struct file_system_type ceph_fs_type = {

0 commit comments

Comments
 (0)