]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dma-buf: fix stale @lock references in struct dma_buf documentation
authorXiang Gao <gaoxiang17@xiaomi.com>
Wed, 15 Apr 2026 05:41:01 +0000 (13:41 +0800)
committerChristian König <christian.koenig@amd.com>
Thu, 23 Apr 2026 08:01:46 +0000 (10:01 +0200)
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.

Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20260415054101.535520-1-gxxa03070307@gmail.com
include/linux/dma-buf.h

index 133b9e637b558fbe3168a119e18616e24c26685c..ef6d93fd7a2ca66fbc5bc46ac067f4205366a560 100644 (file)
@@ -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;