mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
![Christian König](/assets/img/avatar_default.png)
The functions can be called both in _rcu context as well as while holding the lock. v2: add some kerneldoc as suggested by Daniel v3: fix indentation Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-7-christian.koenig@amd.com
17 lines
325 B
C
17 lines
325 B
C
// SPDX-License-Identifier: MIT
|
|
/*
|
|
* Copyright © 2020 Intel Corporation
|
|
*/
|
|
|
|
#include <linux/dma-resv.h>
|
|
|
|
#include "dma_resv_utils.h"
|
|
|
|
void dma_resv_prune(struct dma_resv *resv)
|
|
{
|
|
if (dma_resv_trylock(resv)) {
|
|
if (dma_resv_test_signaled(resv, true))
|
|
dma_resv_add_excl_fence(resv, NULL);
|
|
dma_resv_unlock(resv);
|
|
}
|
|
}
|