mirror of
https://github.com/openharmony/third_party_liburing.git
synced 2026-07-20 03:04:38 -04:00
src/queue: fix reversed check for SQPOLL
A recent commit tried to get the memory semantics correct with SQPOLL,
but had one of the conditions reversed! Fix it up so that we don't use
acquire/release semantics UNLESS we're using SQPOLL, which is the only
case that matters.
Fixes: 4555346461 ("!SQPOLL setups don't need acquire/release semantics on SQ ring updates")
Link: https://github.com/axboe/liburing/issues/694
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
+2
-2
@@ -196,9 +196,9 @@ unsigned __io_uring_flush_sq(struct io_uring *ring)
|
||||
* Ensure kernel sees the SQE updates before the tail update.
|
||||
*/
|
||||
if (!(ring->flags & IORING_SETUP_SQPOLL))
|
||||
io_uring_smp_store_release(sq->ktail, tail);
|
||||
else
|
||||
IO_URING_WRITE_ONCE(*sq->ktail, tail);
|
||||
else
|
||||
io_uring_smp_store_release(sq->ktail, tail);
|
||||
}
|
||||
/*
|
||||
* This _may_ look problematic, as we're not supposed to be reading
|
||||
|
||||
Reference in New Issue
Block a user