Commit 0dc95664 authored by Alok Tiwari's avatar Alok Tiwari Committed by Greg Kroah-Hartman
Browse files

io_uring: fix incorrect unlikely() usage in io_waitid_prep()



[ Upstream commit 4ec703ec ]

The negation operator is incorrectly placed outside the unlikely()
macro:

    if (!unlikely(iwa))

This inverts the compiler branch prediction hint, marking the NULL case
as likely instead of unlikely. The intent is to indicate that allocation
failures are rare, consistent with common kernel patterns.

 Moving the negation inside unlikely():

    if (unlikely(!iwa))

Fixes: 2b4fc4cd ("io_uring/waitid: setup async data in the prep handler")
Signed-off-by: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: default avatarGabriel Krisman Bertazi <krisman@suse.de>
Reviewed-by: default avatarCaleb Sander Mateos <csander@purestorage.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9736fab6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment