From: Pavel Begunkov Date: Fri, 9 Apr 2021 08:13:21 +0000 (+0100) Subject: io_uring: simplify apoll hash removal X-Git-Tag: v5.15~1256^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ea13b448ee75ef0c68c18d207f6c488f143e725;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index 88c9462..abab957 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);