Skip to content

Commit c02c79d

Browse files
Valentin Obstojeda
authored andcommitted
rust: locked_by: shorten doclink preview
Increases readability by removing `super::` from the link preview text. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240131-doc-fixes-v3-v3-12-0c8af94ed7de@valentinobst.de Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent f598b54 commit c02c79d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rust/kernel/sync/locked_by.rs

Lines changed: 5 additions & 2 deletions
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)