summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-01-15 08:51:07 -0700
committerJens Axboe <axboe@kernel.dk>2021-01-15 08:51:07 -0700
commit73a9b2b06b08812ad83d1225be0abf31557a077f (patch)
tree5327c859773dad3d524907460ce1feadded9754b
parent865fe28ec9646b6641df772e1eadb5a506e340ee (diff)
parent2ebc85be70ebfb032afa807574f7a05fcb685a16 (diff)
downloadliburing-73a9b2b06b08812ad83d1225be0abf31557a077f.tar.gz
liburing-73a9b2b06b08812ad83d1225be0abf31557a077f.tar.bz2
Merge branch 'dev/cosmetics' of https://github.com/nunojsa/liburing
* 'dev/cosmetics' of https://github.com/nunojsa/liburing: src/queue: Fix a typo in `__io_uring_flush_sq()` src/queue: fix `sq_ring_needs_enter()` indentation
-rw-r--r--src/queue.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/queue.c b/src/queue.c
index 768e34f..62e7f95 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -25,11 +25,12 @@ static inline bool sq_ring_needs_enter(struct io_uring *ring, unsigned *flags)
{
if (!(ring->flags & IORING_SETUP_SQPOLL))
return true;
- if (uring_unlikely(IO_URING_READ_ONCE(*ring->sq.kflags) &
- IORING_SQ_NEED_WAKEUP)) {
- *flags |= IORING_ENTER_SQ_WAKEUP;
- return true;
- }
+
+ if (uring_unlikely(IO_URING_READ_ONCE(*ring->sq.kflags) &
+ IORING_SQ_NEED_WAKEUP)) {
+ *flags |= IORING_ENTER_SQ_WAKEUP;
+ return true;
+ }
return false;
}
@@ -229,7 +230,7 @@ out:
* This _may_ look problematic, as we're not supposed to be reading
* SQ->head without acquire semantics. When we're in SQPOLL mode, the
* kernel submitter could be updating this right now. For non-SQPOLL,
- * task itself does it, and there's no potential face. But even for
+ * task itself does it, and there's no potential race. But even for
* SQPOLL, the load is going to be potentially out-of-date the very
* instant it's done, regardless or whether or not it's done
* atomically. Worst case, we're going to be over-estimating what