diff -ur linux-2.6.38-rc2-bak/drivers/gpu/drm/drm_hashtab.c linux-2.6.38-rc2/drivers/gpu/drm/drm_hashtab.c --- linux-2.6.38-rc2-bak/drivers/gpu/drm/drm_hashtab.c 2011-01-26 11:04:48.000000000 -0500 +++ linux-2.6.38-rc2/drivers/gpu/drm/drm_hashtab.c 2011-01-26 11:28:44.000000000 -0500 @@ -110,6 +110,9 @@ unsigned int hashed_key; unsigned long key = item->key; + DRM_DEBUG("drm_ht_insert_item: before insert, fill=%u\n", ht->fill); + drm_ht_verbose_list(ht, key); + hashed_key = hash_long(key, ht->order); h_list = &ht->table[hashed_key]; parent = NULL; @@ -126,6 +129,10 @@ } else { hlist_add_head(&item->head, h_list); } + + DRM_DEBUG("drm_ht_insert_item: after insert, fill=%u\n", ht->fill); + drm_ht_verbose_list(ht, key); + return 0; } EXPORT_SYMBOL(drm_ht_insert_item); @@ -177,10 +184,16 @@ { struct hlist_node *list; + DRM_DEBUG("drm_ht_remove_key: before remove, fill=%u\n", ht->fill); + drm_ht_verbose_list(ht, key); + list = drm_ht_find_key(ht, key); if (list) { hlist_del_init(list); ht->fill--; + + DRM_DEBUG("drm_ht_remove_key: after remove, fill=%u\n", ht->fill); + drm_ht_verbose_list(ht, key); return 0; } return -EINVAL; @@ -188,8 +201,17 @@ int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item) { + unsigned long key = item->key; + + DRM_DEBUG("drm_ht_remove_item: before remove, fill=%u\n", ht->fill); + drm_ht_verbose_list(ht, key); + hlist_del_init(&item->head); ht->fill--; + + DRM_DEBUG("drm_ht_remove_item: after remove, fill=%u\n", ht->fill); + drm_ht_verbose_list(ht, key); + return 0; } EXPORT_SYMBOL(drm_ht_remove_item);