Skip to content

Commit

Permalink
ceph: remove call to bdi_unregister
Browse files Browse the repository at this point in the history
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 <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jan 20, 2015
1 parent b83ae6d commit e4d2750
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -1002,11 +991,16 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type,
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 = {
Expand Down

0 comments on commit e4d2750

Please sign in to comment.