summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-01-17 03:52:46 +0300
committerJens Axboe <axboe@kernel.dk>2020-01-20 17:04:06 -0700
commit0791015837f1520dd72918355dcb1f1e79175255 (patch)
tree9e1f2a218ce596ae1d15cda16867c9f783f85248 /fs/io_uring.c
parent711be0312df4d350fb5bf1671c132cccae5aaf9a (diff)
downloadlinux-0791015837f1520dd72918355dcb1f1e79175255.tar.bz2
io_uring: remove extra check in __io_commit_cqring
__io_commit_cqring() is almost always called when there is a change in the rings, so the check is rather pessimising. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 68843a123000..771954bb4c38 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -860,14 +860,12 @@ static void __io_commit_cqring(struct io_ring_ctx *ctx)
{
struct io_rings *rings = ctx->rings;
- if (ctx->cached_cq_tail != READ_ONCE(rings->cq.tail)) {
- /* order cqe stores with ring update */
- smp_store_release(&rings->cq.tail, ctx->cached_cq_tail);
+ /* order cqe stores with ring update */
+ smp_store_release(&rings->cq.tail, ctx->cached_cq_tail);
- if (wq_has_sleeper(&ctx->cq_wait)) {
- wake_up_interruptible(&ctx->cq_wait);
- kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
- }
+ if (wq_has_sleeper(&ctx->cq_wait)) {
+ wake_up_interruptible(&ctx->cq_wait);
+ kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
}
}