Am 03.04.22 um 00:16 schrieb Bas Nieuwenhuizen:
On Mon, Mar 21, 2022 at 2:59 PM Christian König <[email protected]> wrote:[SNIP] @@ -519,17 +513,17 @@ EXPORT_SYMBOL_GPL(dma_resv_iter_first); */ struct dma_fence *dma_resv_iter_next(struct dma_resv_iter *cursor) { - unsigned int idx; + struct dma_fence *fence;dma_resv_assert_held(cursor->obj); cursor->is_restarted = false; - if (!cursor->fences || cursor->index >= cursor->fences->shared_count) + if (!cursor->fences || cursor->index >= cursor->fences->num_fences) return NULL; - idx = cursor->index++; - return rcu_dereference_protected(cursor->fences->shared[idx], - dma_resv_held(cursor->obj)); + dma_resv_list_entry(cursor->fences, cursor->index++, + cursor->obj, &fence, &cursor->fence_usage);Shouldn't we skip the current fence if cursor->fence_usage doesn't match cursor->usage ? (similar to what is done wrt the unlocked variant)
Oh, good point. Totally missed that. Thanks, Christian.
