mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Kernel: Fix index calculation in NVMeQueue submit_sync_sqe function
There was a bug while calculating the next index in submit_sync_sqe function. Use the NVMeQueue's class variable m_qdepth instead of the hardcoded IO_QUEUE_SIZE.
This commit is contained in:
parent
67ce9e28a5
commit
4a8a3df975
Notes:
sideshowbarker
2024-07-17 20:16:06 +09:00
Author: https://github.com/Panky-codes Commit: https://github.com/SerenityOS/serenity/commit/4a8a3df9750 Pull-request: https://github.com/SerenityOS/serenity/pull/12130 Reviewed-by: https://github.com/tomuta ✅
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ u16 NVMeQueue::submit_sync_sqe(NVMeSubmission& sub)
|
|||
SpinlockLocker lock(m_cq_lock);
|
||||
index = m_cq_head - 1;
|
||||
if (index < 0)
|
||||
index = IO_QUEUE_SIZE - 1;
|
||||
index = m_qdepth - 1;
|
||||
}
|
||||
cqe_cid = m_cqe_array[index].command_id;
|
||||
Scheduler::yield();
|
||||
|
|
Loading…
Reference in a new issue