mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
Kernel/AHCI: Reorder complete_current_request
Clear the m_current_request before signalling the end of request.
This commit is contained in:
parent
cfc2f33dcb
commit
2ae9de77bb
Notes:
sideshowbarker
2024-07-18 21:11:38 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/2ae9de77bb3 Pull-request: https://github.com/SerenityOS/serenity/pull/5865 Reviewed-by: https://github.com/bgianfo Reviewed-by: https://github.com/tomuta
1 changed files with 2 additions and 2 deletions
|
@ -498,8 +498,9 @@ void AHCIPort::start_request(AsyncBlockDeviceRequest& request)
|
|||
void AHCIPort::complete_current_request(AsyncDeviceRequest::RequestResult result)
|
||||
{
|
||||
VERIFY(m_current_request);
|
||||
m_current_request->complete(result);
|
||||
auto current_request = m_current_request;
|
||||
m_current_request.clear();
|
||||
current_request->complete(result);
|
||||
}
|
||||
|
||||
bool AHCIPort::spin_until_ready() const
|
||||
|
@ -520,7 +521,6 @@ bool AHCIPort::spin_until_ready() const
|
|||
|
||||
bool AHCIPort::access_device(AsyncBlockDeviceRequest::RequestType direction, u64 lba, u8 block_count)
|
||||
{
|
||||
VERIFY(m_lock.is_locked());
|
||||
VERIFY(m_connected_device);
|
||||
VERIFY(is_operable());
|
||||
VERIFY(m_lock.is_locked());
|
||||
|
|
Loading…
Reference in a new issue