runtime: fix handling of cancelled io_uring Ops (#7436)

This commit is contained in:
Motoyuki Kimura
2025-07-05 10:41:37 +02:00
committed by GitHub
parent ab3ff69cf2
commit 0783797520
+4 -1
View File
@@ -289,7 +289,10 @@ impl Handle {
match mem::replace(lifecycle, Lifecycle::Cancelled(cancel_data)) {
Lifecycle::Submitted | Lifecycle::Waiting(_) => (),
// The driver saw the completion, but it was never polled.
Lifecycle::Completed(_) => (),
Lifecycle::Completed(_) => {
// We can safely remove the entry from the slab, as it has already been completed.
ops.remove(index);
}
prev => panic!("Unexpected state: {:?}", prev),
};
}