summaryrefslogtreecommitdiffstats
path: root/io_uring/waitid.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2024-03-18 23:00:30 +0100
committerJens Axboe <axboe@kernel.dk>2024-04-15 16:10:24 +0200
commit8e5b3b89ecaf6d9295e561c225b35c574a5e0fe7 (patch)
tree6a35205e09dd5a3ec397a3c1c38445b032856000 /io_uring/waitid.c
parentio_uring: force tw ctx locking (diff)
downloadlinux-8e5b3b89ecaf6d9295e561c225b35c574a5e0fe7.tar.xz
linux-8e5b3b89ecaf6d9295e561c225b35c574a5e0fe7.zip
io_uring: remove struct io_tw_state::locked
ctx is always locked for task_work now, so get rid of struct io_tw_state::locked. Note I'm stopping one step before removing io_tw_state altogether, which is not empty, because it still serves the purpose of indicating which function is a tw callback and forcing users not to invoke them carelessly out of a wrong context. The removal can always be done later. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Tested-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/e95e1ea116d0bfa54b656076e6a977bc221392a4.1710799188.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/waitid.c')
-rw-r--r--io_uring/waitid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/waitid.c b/io_uring/waitid.c
index 77d340666cb9..6362ec20abc0 100644
--- a/io_uring/waitid.c
+++ b/io_uring/waitid.c
@@ -118,7 +118,7 @@ static int io_waitid_finish(struct io_kiocb *req, int ret)
static void io_waitid_complete(struct io_kiocb *req, int ret)
{
struct io_waitid *iw = io_kiocb_to_cmd(req, struct io_waitid);
- struct io_tw_state ts = { .locked = true };
+ struct io_tw_state ts = {};
/* anyone completing better be holding a reference */
WARN_ON_ONCE(!(atomic_read(&iw->refs) & IO_WAITID_REF_MASK));