mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05: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
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…
Add table
Reference in a new issue