nouveau/mm: move slabs to correct list on memory release

Should get rid of "destroying GPU memory cache with some buffers
still in use" message.
This commit is contained in:
Christoph Bumiller 2011-08-30 14:29:23 +02:00
parent 210ddf0819
commit 8476232b08

View file

@ -210,13 +210,13 @@ nouveau_mm_free(struct nouveau_mm_allocation *alloc)
mm_slab_free(slab, alloc->offset >> slab->order);
if (slab->free == slab->count) {
LIST_DEL(&slab->head);
LIST_ADDTAIL(&slab->head, &bucket->free);
} else
if (slab->free == 1) {
LIST_DEL(&slab->head);
if (slab->count > 1)
LIST_ADDTAIL(&slab->head, &bucket->used);
else
LIST_ADDTAIL(&slab->head, &bucket->free);
LIST_ADDTAIL(&slab->head, &bucket->used);
}
FREE(alloc);