/* ubifs_tnc_close - close TNC subsystem and free all related resources.  */
void ubifs_tnc_close(struct ubifs_info *c)
/* ubifs_tnc_close - close TNC subsystem and free all related resources.  */
void ubifs_tnc_close(struct ubifs_info *c)
{
	long clean_freed;
	tnc_destroy_cnext(c);
	if (c->zroot.znode) {
		clean_freed = ubifs_destroy_tnc_subtree(c->zroot.znode);
		atomic_long_sub(clean_freed, &ubifs_clean_zn_cnt);
	}
	kfree(c->gap_lebs);
	kfree(c->ilebs);
	destroy_old_idx(c);
}