summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-04-09 09:13:21 +0100
committerJens Axboe <axboe@kernel.dk>2021-04-11 19:30:40 -0600
commit0ea13b448ee75ef0c68c18d207f6c488f143e725 (patch)
tree691752de87c2e3a5adc2a01ad3b6db401fa6466e /fs/io_uring.c
parente27414bef7b4f25f4569401e42bc68d9fdfc3125 (diff)
downloadlwn-0ea13b448ee75ef0c68c18d207f6c488f143e725.tar.gz
lwn-0ea13b448ee75ef0c68c18d207f6c488f143e725.zip
io_uring: simplify apoll hash removal
hash_del() works well with non-hashed nodes, there's no need to check if it is hashed first. 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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 88c94627c743..abab95767307 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5059,10 +5059,7 @@ static void io_async_task_func(struct callback_head *cb)
return;
}
- /* If req is still hashed, it cannot have been canceled. Don't check. */
- if (hash_hashed(&req->hash_node))
- hash_del(&req->hash_node);
-
+ hash_del(&req->hash_node);
io_poll_remove_double(req);
spin_unlock_irq(&ctx->completion_lock);