diff options
author | Christian Brauner <brauner@kernel.org> | 2025-01-10 12:01:21 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-01-10 12:01:21 +0100 |
commit | 1623bc27a85a93e82194c8d077eccc464efa67db (patch) | |
tree | 491bd1e87d00a93d474579365add4d0dceb54fc1 /io_uring | |
parent | afs: Fix merge preference rule failure condition (diff) | |
parent | Merge patch series "poll_wait: add mb() to fix theoretical race between waitq... (diff) | |
download | linux-1623bc27a85a93e82194c8d077eccc464efa67db.tar.xz linux-1623bc27a85a93e82194c8d077eccc464efa67db.zip |
Merge branch 'vfs-6.14.poll' into vfs.fixes
Bring in the fixes for __pollwait() and waitqueue_active() interactions.
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index d3403c8216db..7a1e260aa7ba 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -2813,13 +2813,12 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait) if (unlikely(!ctx->poll_activated)) io_activate_pollwq(ctx); - - poll_wait(file, &ctx->poll_wq, wait); /* - * synchronizes with barrier from wq_has_sleeper call in - * io_commit_cqring + * provides mb() which pairs with barrier from wq_has_sleeper + * call in io_commit_cqring */ - smp_rmb(); + poll_wait(file, &ctx->poll_wq, wait); + if (!io_sqring_full(ctx)) mask |= EPOLLOUT | EPOLLWRNORM; |