aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-10-22 16:43:10 +0100
committerJens Axboe <axboe@kernel.dk>2020-10-23 13:07:11 -0600
commitcdfcc3ee04599ce51e5c84432c177163637dd0e0 (patch)
treeebfdaeb9313eba2ec9ec5f4389f440a26a4a8667 /fs
parentio_uring: don't adjust LINK_HEAD in cancel ltimeout (diff)
downloadlinux-dev-cdfcc3ee04599ce51e5c84432c177163637dd0e0.tar.xz
linux-dev-cdfcc3ee04599ce51e5c84432c177163637dd0e0.zip
io_uring: always clear LINK_TIMEOUT after cancel
Move REQ_F_LINK_TIMEOUT clearing out of __io_kill_linked_timeout() because it might return early and leave the flag set. It's not a problem, but may be confusing. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 043652929aa9..552c27850c36 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1881,7 +1881,6 @@ static bool __io_kill_linked_timeout(struct io_kiocb *req)
list_del_init(&link->link_list);
wake_ev = io_link_cancel_timeout(link);
- req->flags &= ~REQ_F_LINK_TIMEOUT;
return wake_ev;
}
@@ -1893,6 +1892,7 @@ static void io_kill_linked_timeout(struct io_kiocb *req)
spin_lock_irqsave(&ctx->completion_lock, flags);
wake_ev = __io_kill_linked_timeout(req);
+ req->flags &= ~REQ_F_LINK_TIMEOUT;
spin_unlock_irqrestore(&ctx->completion_lock, flags);
if (wake_ev)