/* Decrement the reference count on a GTS structure. Free the structure if the reference count goes to zero.  */
void gts_drop(struct gru_thread_state *gts)
/* Decrement the reference count on a GTS structure. Free the structure if the reference count goes to zero.  */
void gts_drop(struct gru_thread_state *gts)
{
	if (gts && atomic_dec_return(&gts->ts_refcnt) == 0) {
		if (gts->ts_gms)
			gru_drop_mmu_notifier(gts->ts_gms);
		kfree(gts);
		STAT(gts_free);
	}
}