Skip to content

Commit ed6d0be

Browse files
Valentin Obstojeda
Valentin Obst
authored andcommitted
rust: locked_by: shorten doclink preview
Increases readability by removing `super::` from the link preview text. Signed-off-by: Valentin Obst <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent cd16c41 commit ed6d0be

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rust/kernel/sync/locked_by.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ use core::{cell::UnsafeCell, mem::size_of, ptr};
99
/// Allows access to some data to be serialised by a lock that does not wrap it.
1010
///
1111
/// In most cases, data protected by a lock is wrapped by the appropriate lock type, e.g.,
12-
/// [`super::Mutex`] or [`super::SpinLock`]. [`LockedBy`] is meant for cases when this is not
13-
/// possible. For example, if a container has a lock and some data in the contained elements needs
12+
/// [`Mutex`] or [`SpinLock`]. [`LockedBy`] is meant for cases when this is not possible.
13+
/// For example, if a container has a lock and some data in the contained elements needs
1414
/// to be protected by the same lock.
1515
///
1616
/// [`LockedBy`] wraps the data in lieu of another locking primitive, and only allows access to it
1717
/// when the caller shows evidence that the 'external' lock is locked. It panics if the evidence
1818
/// refers to the wrong instance of the lock.
1919
///
20+
/// [`Mutex`]: super::Mutex
21+
/// [`SpinLock`]: super::SpinLock
22+
///
2023
/// # Examples
2124
///
2225
/// The following is an example for illustrative purposes: `InnerDirectory::bytes_used` is an

0 commit comments

Comments
 (0)