[PATCH -next] rust: poll: fix compilation error due to kvfree_call_rcu changes

"Vlastimil Babka (SUSE)" <[email protected]>
Newsgroups org.kernel.vger.linux-next,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
kvfree_call_rcu() changed the type of its parameter to kvfree_rcu_head
in commit acc6fdade62c ("mm/slab: introduce struct kvfree_rcu_head for
kvfree_rcu batching") in the slab tree

Meanwhile rust started relying on the old type in commit e5e86df8b666
("rust: poll: use kfree_rcu() for PollCondVar") in the char-misc tree.

Reconcile the two changes as suggested by Gary [1]. This should be
applied as the merge commit for either slab tree or char-misc tree,
whichever is merged to -next later. The code it changes comes from
char-misc tree.

[1] https://lore.kernel.org/all/[email protected]/

Suggested-by: Gary Guo <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Vlastimil Babka (SUSE) <[email protected]>
---
 rust/kernel/sync/poll.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/sync/poll.rs b/rust/kernel/sync/poll.rs
index 684dfa242b1a..f3cdf95db12d 100644
--- a/rust/kernel/sync/poll.rs
+++ b/rust/kernel/sync/poll.rs
@@ -124,7 +124,7 @@ pub struct PollCondVarBox {
 struct PollCondVarBoxInner {
     #[pin]
     inner: PollCondVar,
-    rcu: Opaque<bindings::callback_head>,
+    rcu: Opaque<bindings::kvfree_rcu_head>,
 }
 
 // SAFETY: PollCondVar is Send

---
base-commit: 1701fda2f58e345c050f4309971bdc07cd6146ba
change-id: 20260805-slab-rust-fix-b1828ce329e3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.