git: 0866e454c216 - stable/15 - linuxkpi: Add `radix_tree_deref_slot()`
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Apr 2026 21:08:13 UTC
The branch stable/15 has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=0866e454c2168f7f289e17f778156cff595107b8
commit 0866e454c2168f7f289e17f778156cff595107b8
Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2025-09-07 13:45:10 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-04-22 20:56:56 +0000
linuxkpi: Add `radix_tree_deref_slot()`
We don't do reference counting, we only dereference the pointer and
retunr the value.
The amdgpu DRM driver started to use it in Linux 6.10.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54502
(cherry picked from commit 4c89b333808a7eae0dad595b13686e9cf60bd4e6)
---
sys/compat/linuxkpi/common/include/linux/radix-tree.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/radix-tree.h b/sys/compat/linuxkpi/common/include/linux/radix-tree.h
index 1019697303db..55f0fc949807 100644
--- a/sys/compat/linuxkpi/common/include/linux/radix-tree.h
+++ b/sys/compat/linuxkpi/common/include/linux/radix-tree.h
@@ -68,6 +68,12 @@ struct radix_tree_iter {
for ((iter)->index = (start); \
radix_tree_iter_find(root, iter, &(slot)); (iter)->index++)
+static inline void *
+radix_tree_deref_slot(void **slot)
+{
+ return (*slot);
+}
+
static inline int
radix_tree_exception(void *arg)
{