diff options
Diffstat (limited to 'fs/ceph/super.c')
| -rw-r--r-- | fs/ceph/super.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 50f06cddc94b..5ae62587a71d 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
| @@ -40,17 +40,6 @@ static void ceph_put_super(struct super_block *s) | |||
| 40 | 40 | ||
| 41 | dout("put_super\n"); | 41 | dout("put_super\n"); |
| 42 | ceph_mdsc_close_sessions(fsc->mdsc); | 42 | 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; | ||
| 54 | } | 43 | } |
| 55 | 44 | ||
| 56 | static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) | 45 | static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) |
| @@ -910,7 +899,7 @@ static int ceph_register_bdi(struct super_block *sb, | |||
| 910 | >> PAGE_SHIFT; | 899 | >> PAGE_SHIFT; |
| 911 | else | 900 | else |
| 912 | fsc->backing_dev_info.ra_pages = | 901 | fsc->backing_dev_info.ra_pages = |
| 913 | default_backing_dev_info.ra_pages; | 902 | VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE; |
| 914 | 903 | ||
| 915 | err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%ld", | 904 | err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%ld", |
| 916 | atomic_long_inc_return(&bdi_seq)); | 905 | atomic_long_inc_return(&bdi_seq)); |
| @@ -1002,11 +991,16 @@ out_final: | |||
| 1002 | static void ceph_kill_sb(struct super_block *s) | 991 | static void ceph_kill_sb(struct super_block *s) |
| 1003 | { | 992 | { |
| 1004 | struct ceph_fs_client *fsc = ceph_sb_to_client(s); | 993 | struct ceph_fs_client *fsc = ceph_sb_to_client(s); |
| 994 | dev_t dev = s->s_dev; | ||
| 995 | |||
| 1005 | dout("kill_sb %p\n", s); | 996 | dout("kill_sb %p\n", s); |
| 997 | |||
| 1006 | ceph_mdsc_pre_umount(fsc->mdsc); | 998 | 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); |
| 1008 | ceph_mdsc_destroy(fsc); | 1000 | ceph_mdsc_destroy(fsc); |
| 1001 | |||
| 1009 | destroy_fs_client(fsc); | 1002 | destroy_fs_client(fsc); |
| 1003 | free_anon_bdev(dev); | ||
| 1010 | } | 1004 | } |
| 1011 | 1005 | ||
| 1012 | static struct file_system_type ceph_fs_type = { | 1006 | static struct file_system_type ceph_fs_type = { |
