struct qxl_bo *bo;
 
        list_for_each_entry(bo, &qdev->gem.objects, list) {
-               struct dma_resv_list *fobj;
-               int rel;
-
-               rcu_read_lock();
-               fobj = dma_resv_shared_list(bo->tbo.base.resv);
-               rel = fobj ? fobj->shared_count : 0;
-               rcu_read_unlock();
+               struct dma_resv_iter cursor;
+               struct dma_fence *fence;
+               int rel = 0;
+
+               dma_resv_iter_begin(&cursor, bo->tbo.base.resv, true);
+               dma_resv_for_each_fence_unlocked(&cursor, fence) {
+                       if (dma_resv_iter_is_restarted(&cursor))
+                               rel = 0;
+                       ++rel;
+               }
 
                seq_printf(m, "size %ld, pc %d, num releases %d\n",
                           (unsigned long)bo->tbo.base.size,