projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6933c10
)
rust: sync: add missing newline in locked_by log example
author
Alban Kurti
<kurti@invicto.ai>
Thu, 6 Feb 2025 21:07:55 +0000
(21:07 +0000)
committer
Miguel Ojeda
<ojeda@kernel.org>
Thu, 6 Mar 2025 19:44:06 +0000
(20:44 +0100)
The pr_info! example in rust/kernel/sync/locked_by.rs was missing
a newline. This patch appends the missing newline to ensure
that log messages for locked resources display correctly.
Fixes:
7b1f55e3a984
("rust: sync: introduce `LockedBy`")
Reported-by: Miguel Ojeda <ojeda@kernel.org>
Link:
https://github.com/Rust-for-Linux/linux/issues/1139
Signed-off-by: Alban Kurti <kurti@invicto.ai>
Link:
https://lore.kernel.org/r/20250206-printing_fix-v3-4-a85273b501ae@invicto.ai
[ Replaced Closes with Link since it fixes part of the issue. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/sync/locked_by.rs
patch
|
blob
|
blame
|
history
diff --git
a/rust/kernel/sync/locked_by.rs
b/rust/kernel/sync/locked_by.rs
index a7b244675c2b96a36a6fe2e3ddd9a68e6ea01cb7..61f100a45b3507c750c1e3c405f9a8f67ced5346 100644
(file)
--- a/
rust/kernel/sync/locked_by.rs
+++ b/
rust/kernel/sync/locked_by.rs
@@
-55,7
+55,7
@@
use core::{cell::UnsafeCell, mem::size_of, ptr};
/// fn print_bytes_used(dir: &Directory, file: &File) {
/// let guard = dir.inner.lock();
/// let inner_file = file.inner.access(&guard);
-/// pr_info!("{} {}", guard.bytes_used, inner_file.bytes_used);
+/// pr_info!("{} {}
\n
", guard.bytes_used, inner_file.bytes_used);
/// }
///
/// /// Increments `bytes_used` for both the directory and file.