]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ceph: only unregister registered bdi
authorSage Weil <sage@newdream.net>
Tue, 22 Dec 2009 05:04:26 +0000 (21:04 -0800)
committerSage Weil <sage@newdream.net>
Wed, 23 Dec 2009 16:17:18 +0000 (08:17 -0800)
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/super.c

index b9cb8cebcdc1b19bace63f327182a211f32f43a5..cd81c84e96fc36531e46978aea1086c30272ae06 100644 (file)
@@ -942,7 +942,8 @@ static void ceph_kill_sb(struct super_block *s)
        dout("kill_sb %p\n", s);
        ceph_mdsc_pre_umount(&client->mdsc);
        kill_anon_super(s);    /* will call put_super after sb is r/o */
-       bdi_unregister(&client->backing_dev_info);
+       if (s->s_bdi == &client->backing_dev_info)
+               bdi_unregister(&client->backing_dev_info);
        bdi_destroy(&client->backing_dev_info);
        ceph_destroy_client(client);
 }