summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorYilin Chen <1479826151@qq.com>2026-07-08 07:21:06 +0000
committerAndreas Hindborg <a.hindborg@kernel.org>2026-09-22 16:06:59 +0200
commit17ca0bc06bb246d9488556f3f16ad6f37a4fc5ad (patch)
treeaaaddd0ca83bd2d08c6866bb53c34a4017fe67c8 /rust/kernel
parentdf2908090cda368b01ff43709f51890076c56157 (diff)
downloadlinux-next-17ca0bc06bb246d9488556f3f16ad6f37a4fc5ad.tar.gz
linux-next-17ca0bc06bb246d9488556f3f16ad6f37a4fc5ad.zip
rust: configfs: fix release safety documentation
ItemOperationsVTable<Group<Data>, Data>::release() receives a pointer to a config_item, not a config_group. The old Safety docs described the pointer as a config_group embedded in Group<Parent>. Update them to state that the pointer must be the cg_item field of a config_group embedded in a valid Group<Data>. Assisted-by: Codex:GPT-5 Signed-off-by: Yilin Chen <1479826151@qq.com> Link: https://msgid.link/tencent_9FAFC60382D724C608F0F6BFABFC63BB6707@qq.com Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/configfs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/configfs.rs b/rust/kernel/configfs.rs
index cd082b83e9e7..7722035ebc02 100644
--- a/rust/kernel/configfs.rs
+++ b/rust/kernel/configfs.rs
@@ -437,8 +437,8 @@ where
{
/// # Safety
///
- /// `this` must be a pointer to a `bindings::config_group` embedded in a
- /// `Group<Parent>`.
+ /// `this` must be a pointer to the `cg_item` field of a `bindings::config_group` embedded in a
+ /// valid `Group<Data>`.
///
/// This function will destroy the pointee of `this`. The pointee of `this`
/// must not be accessed after the function returns.