From: Danilo Krummrich Date: Fri, 7 Nov 2025 09:16:07 +0000 (+0100) Subject: rust: debugfs: Implement BinaryReader for Mutex only when T is Unpin X-Git-Tag: v6.19-rc1~90^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bc605713f16ad77e0a3f30f992aa3794c381372;p=thirdparty%2Fkernel%2Flinux.git rust: debugfs: Implement BinaryReader for Mutex only when T is Unpin Commit da123f0ee40f ("rust: lock: guard: Add T: Unpin bound to DerefMut") from tip/master adds an Unpin bound to T for Mutex, hence also restrict the implementation of BinaryReader for Mutex accordingly. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/all/20251107134144.117905bd@canb.auug.org.au/ Reviewed-by: Alice Ryhl Link: https://patch.msgid.link/20251107091612.2557480-1-dakr@kernel.org Signed-off-by: Danilo Krummrich --- diff --git a/rust/kernel/debugfs/traits.rs b/rust/kernel/debugfs/traits.rs index 2c32ddf9826f5..82441ac8adaab 100644 --- a/rust/kernel/debugfs/traits.rs +++ b/rust/kernel/debugfs/traits.rs @@ -257,7 +257,7 @@ pub trait BinaryReader { } // Delegate for `Mutex`: Support a `T` with an outer `Mutex`. -impl BinaryReader for Mutex { +impl BinaryReader for Mutex { fn read_from_slice( &self, reader: &mut UserSliceReader,