dma-buf: fix stale @lock references in struct dma_buf documentation
Subsystems (2)
PATCH 1/1 dma-buf: fix stale @lock references in struct dma_buf documentation
From: Xiang Gao <[email protected]>
The kernel-doc comments for vmapping_counter and vmap_ptr in struct dma_buf reference "@lock" as the protecting lock, but struct dma_buf no longer has a "lock" member. The mutex was removed in favor of using the dma_resv lock exclusively. The implementation correctly uses dma_resv_assert_held(dmabuf->resv) in dma_buf_vmap() and dma_buf_vunmap(), so update the documentation to reference @resv instead.
--- include/linux/dma-buf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/dma-buf.h +2 -2
@@ -322,13 +322,13 @@ struct dma_buf {* @vmapping_counter: * * Used internally to refcnt the vmaps returned by dma_buf_vmap(). -* Protected by @lock. +* Protected by @resv. */ unsigned vmapping_counter;/** * @vmap_ptr: -* The current vmap ptr if @vmapping_counter > 0. Protected by @lock. +* The current vmap ptr if @vmapping_counter > 0. Protected by @resv. */ struct iosys_map vmap_ptr;
Signature · 1 line
2.34.1
Hi Christian König.
________________________________
发件人: Xiang Gao <[email protected]>
发送时间: 2026年4月15日 13:41:01
收件人: [email protected]; [email protected]
抄送: [email protected]; [email protected]; [email protected]; [email protected]; 高翔 主题: [External Mail][PATCH] dma-buf: fix stale @lock references in struct dma_buf documentation
[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给[email protected]进行反馈
From: Xiang Gao <[email protected]>
The kernel-doc comments for vmapping_counter and vmap_ptr in struct dma_buf reference "@lock" as the protecting lock, but struct dma_buf no longer has a "lock" member. The mutex was removed in favor of using the dma_resv lock exclusively. The implementation correctly uses dma_resv_assert_held(dmabuf->resv) in dma_buf_vmap() and dma_buf_vunmap(), so update the documentation to reference @resv instead.
--- include/linux/dma-buf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/dma-buf.h +2 -2
@@ -322,13 +322,13 @@ struct dma_buf {* @vmapping_counter: * * Used internally to refcnt the vmaps returned by dma_buf_vmap(). -* Protected by @lock. +* Protected by @resv. */ unsigned vmapping_counter;/** * @vmap_ptr: -* The current vmap ptr if @vmapping_counter > 0. Protected by @lock. +* The current vmap ptr if @vmapping_counter > 0. Protected by @resv. */ struct iosys_map vmap_ptr;
--
2.34.1