linux/rust/kernel/block
Andreas Hindborg fd764e74e5 rust: block: fix wrong usage of lockdep API
When allocating `struct gendisk`, `GenDiskBuilder` is using a dynamic
lock class key without registering the key. This is an incorrect use of
the API, which causes a `WARN` trace.

Fix the issue by using a static lock class key, which is more appropriate
for the situation anyway.

Fixes: 3253aba340 ("rust: block: introduce `kernel::block::mq` module")
Reported-by: Behme Dirk (XC-CP/ESB5) <Dirk.Behme@de.bosch.com>
Closes: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/457090036
Signed-off-by: Andreas Hindborg <a.hindborg@samsung.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Link: https://lore.kernel.org/r/20240815074519.2684107-3-nmi@metaspace.dk
[ Applied `rustfmt`, reworded slightly and made Zulip link
  a permalink. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-08-21 13:28:13 +02:00
..
mq rust: block: fix wrong usage of lockdep API 2024-08-21 13:28:13 +02:00
mq.rs