public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 3/3] io_uring: simplify apoll hash removal
Date: Fri,  9 Apr 2021 09:13:21 +0100	[thread overview]
Message-ID: <965e7744028428e6b664c8b859cb558ab7de97d1.1617955705.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

hash_del() works well with non-hashed nodes.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 fs/io_uring.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index c5a0091e4042..a724e63dd8c7 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5040,10 +5040,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);
 
-- 
2.24.0


  parent reply	other threads:[~2021-04-09  8:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  8:13 [PATCH 0/3] first batch of poll cleanups Pavel Begunkov
2021-04-09  8:13 ` [PATCH 1/3] io_uring: clean up io_poll_task_func() Pavel Begunkov
2021-04-09  8:13 ` [PATCH 2/3] io_uring: refactor io_poll_complete() Pavel Begunkov
2021-04-09  8:13 ` Pavel Begunkov [this message]
2021-04-10 20:44 ` [PATCH 0/3] first batch of poll cleanups Jens Axboe
2021-04-11  0:38   ` Pavel Begunkov
2021-04-11  2:30     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=965e7744028428e6b664c8b859cb558ab7de97d1.1617955705.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox