+/**
+ *Clean the unfenced list and put on regular LRU.
+ *This is part of the memory manager cleanup and should only be
+ *called with the DRI lock held.
+ *Call dev->struct_sem locked.
+ */
+
+static void drm_bo_clean_unfenced(drm_device_t *dev)
+{
+ drm_buffer_manager_t *bm = &dev->bm;
+ struct list_head *head, *list;
+ drm_buffer_object_t *entry;
+
+ head = &bm->unfenced;
+
+ list = head->next;
+ while(list != head) {
+ prefetch(list->next);
+ entry = list_entry(list, drm_buffer_object_t, lru);
+
+ atomic_inc(&entry->usage);
+ mutex_unlock(&dev->struct_mutex);
+ mutex_lock(&entry->mutex);
+ mutex_lock(&dev->struct_mutex);
+
+ list_del(&entry->lru);
+ DRM_FLAG_MASKED(entry->priv_flags, 0, _DRM_BO_FLAG_UNFENCED);
+ drm_bo_add_to_lru(entry);
+ mutex_unlock(&entry->mutex);
+ list = head->next;
+ }
+}
+