diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-12-13 01:18:20 -0800 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-12-13 01:18:20 -0800 |
| commit | a4a508df2aa34f8650afde54ea804321c618f45f (patch) | |
| tree | f75f10e7c54f991d7d859f8cbdcc8bcaed5bbd6f /rust/kernel/workqueue.rs | |
| parent | c4b3133c6a2fc283cb3d34c64d40ed2fa254b608 (diff) | |
| parent | 7d0a66e4bb9081d75c82ec4957c50034cb0ea449 (diff) | |
| download | linux-a4a508df2aa34f8650afde54ea804321c618f45f.tar.gz linux-a4a508df2aa34f8650afde54ea804321c618f45f.zip | |
Merge tag 'v6.18' into next
Sync up with the mainline to bring in the latest APIs.
Diffstat (limited to 'rust/kernel/workqueue.rs')
| -rw-r--r-- | rust/kernel/workqueue.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index b9343d5bc00f..706e833e9702 100644 --- a/rust/kernel/workqueue.rs +++ b/rust/kernel/workqueue.rs @@ -356,18 +356,11 @@ struct ClosureWork<T> { func: Option<T>, } -impl<T> ClosureWork<T> { - fn project(self: Pin<&mut Self>) -> &mut Option<T> { - // SAFETY: The `func` field is not structurally pinned. - unsafe { &mut self.get_unchecked_mut().func } - } -} - impl<T: FnOnce()> WorkItem for ClosureWork<T> { type Pointer = Pin<KBox<Self>>; fn run(mut this: Pin<KBox<Self>>) { - if let Some(func) = this.as_mut().project().take() { + if let Some(func) = this.as_mut().project().func.take() { (func)() } } |
