From: Sage Weil Date: Tue, 22 Dec 2009 05:04:26 +0000 (-0800) Subject: ceph: only unregister registered bdi X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0e3271074e1ebd0b80a912a457ce03c971bcd66;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ceph: only unregister registered bdi Signed-off-by: Sage Weil --- diff --git a/fs/ceph/super.c b/fs/ceph/super.c index b9cb8cebcdc1..cd81c84e96fc 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -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); }