Displaying 1 result from an estimated 1 matches for "kref_put_mutex".
2023 Aug 28
0
[PATCH v15 11/23] dma-resv: Add kref_put_dma_resv()
..._put_dma_resv() helper that wraps around kref_put_ww_mutex()
> for drivers that needs to lock dma-resv on kref_put().
>
> It's not possible to easily add this helper to kref.h because of the
> headers inclusion dependency, hence add it to dma-resv.h.
I was never really a big fan of kref_put_mutex() in the first place.
The main advantage comes from the included memory barrier, but this
actually doesn't work like most people think it works and is usually
pretty dangerous.
And IIRC this was done because of the some special behavior mutexes have
with memory barriers and that isn't...