Kernel: Actually report nvme request status
Due to an incorrect lambda scope capture declaration, we would copy the result status at the start of the function, before it actually got updated with the final status. Capture it by reference instead to ensure we report the updated result.
This commit is contained in:
parent
38dad2e27f
commit
263127f21a
Notes:
sideshowbarker
2024-07-16 22:58:46 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/263127f21a Pull-request: https://github.com/SerenityOS/serenity/pull/23142
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ void NVMeQueue::complete_current_request(u16 cmdid, u16 status)
|
|||
auto current_request = request_pdu.request;
|
||||
AsyncDeviceRequest::RequestResult req_result = AsyncDeviceRequest::Success;
|
||||
|
||||
ScopeGuard guard = [req_result, status, &request_pdu] {
|
||||
ScopeGuard guard = [&req_result, status, &request_pdu] {
|
||||
if (request_pdu.request)
|
||||
request_pdu.request->complete(req_result);
|
||||
if (request_pdu.end_io_handler)
|
||||
|
|
Loading…
Add table
Reference in a new issue