dma-buf: make dma_fence structure a bit smaller v2
authorChristian König <christian.koenig@amd.com>
Wed, 7 Aug 2019 10:31:48 +0000 (12:31 +0200)
committerChristian König <christian.koenig@amd.com>
Sat, 10 Aug 2019 10:30:07 +0000 (12:30 +0200)
commit0e2f733addbf7702065cc18d38b67a1284d0c2be
treeeead8f17ec88ec30401cb0c7f339b559a28bf924
parenta84ddb83806ed43a67f6fe6a03b0b4695cc314c3
dma-buf: make dma_fence structure a bit smaller v2

We clear the callback list on kref_put so that by the time we
release the fence it is unused. No one should be adding to the cb_list
that they don't themselves hold a reference for.

This small change is actually making the structure 16% smaller.

v2: add the comment to the code as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/322916/
include/linux/dma-fence.h