[PATCH v2] rust: configfs: fix release safety documentation

From: Yilin Chen

Date: Wed Jul 08 2026 - 03:28:07 EST


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@xxxxxx>
---
Changes in v2:
- Use the wording suggested in review: describe `this` as the `cg_item`
field of a `bindings::config_group` embedded in a valid `Group<Data>`.

rust/kernel/configfs.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/configfs.rs b/rust/kernel/configfs.rs
index 2339c6467..b626eb7dc 100644
--- a/rust/kernel/configfs.rs
+++ b/rust/kernel/configfs.rs
@@ -437,8 +437,8 @@ impl<Data> ItemOperationsVTable<Group<Data>, Data>
{
/// # 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.
--
2.25.1