kernel/device_manager: Always use the marker in the IOScheduler.

When dropping the lock (or calling _Finisher) the owner could go away.
So we have to keep track of our position in the list a different way.

Fixes #20213.

Change-Id: I1f0857c05ec985c7fe2f913a75be20ea91e6994c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11405
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit e6155d041190f459d601022bd63840819d2beecc)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11407
This commit is contained in:
Augustin Cavalier
2026-08-04 02:49:05 +00:00
committed by waddlesplash
parent 52d627b267
commit be1b4b813d
@@ -801,10 +801,9 @@ panic("no more requests for owner %p (thread %" B_PRId32 ")", owner, owner->thre
_NextActiveRequestOwner(owner, quantum);
}
// If the current owner doesn't have anymore requests, we have to
// insert our marker, since the owner will be gone in the next
// iteration.
if (owner->requests.IsEmpty()) {
// Since we're going to drop the lock, we have to use the marker to
// keep track of where we are in the ActiveRequestOwners list.
if (owner != NULL) {
fActiveRequestOwners.InsertBefore(owner, &marker);
owner = NULL;
}