]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/ceph/super.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[karo-tx-linux.git] / fs / ceph / super.c
index 8f8983f38b822ed2abfcd1277111b81e20e82b8f..a63997b8bcff8ac6d5967361700d79f1b6e35c3f 100644 (file)
@@ -40,17 +40,6 @@ static void ceph_put_super(struct super_block *s)
 
        dout("put_super\n");
        ceph_mdsc_close_sessions(fsc->mdsc);
-
-       /*
-        * ensure we release the bdi before put_anon_super releases
-        * the device name.
-        */
-       if (s->s_bdi == &fsc->backing_dev_info) {
-               bdi_unregister(&fsc->backing_dev_info);
-               s->s_bdi = NULL;
-       }
-
-       return;
 }
 
 static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -914,7 +903,7 @@ static int ceph_register_bdi(struct super_block *sb,
                        >> PAGE_SHIFT;
        else
                fsc->backing_dev_info.ra_pages =
-                       default_backing_dev_info.ra_pages;
+                       VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE;
 
        err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%ld",
                           atomic_long_inc_return(&bdi_seq));
@@ -1006,11 +995,16 @@ out_final:
 static void ceph_kill_sb(struct super_block *s)
 {
        struct ceph_fs_client *fsc = ceph_sb_to_client(s);
+       dev_t dev = s->s_dev;
+
        dout("kill_sb %p\n", s);
+
        ceph_mdsc_pre_umount(fsc->mdsc);
-       kill_anon_super(s);    /* will call put_super after sb is r/o */
+       generic_shutdown_super(s);
        ceph_mdsc_destroy(fsc);
+
        destroy_fs_client(fsc);
+       free_anon_bdev(dev);
 }
 
 static struct file_system_type ceph_fs_type = {