public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] Subject: io_uring: Remove the check of data->free_work and data->do_work in io_wq_create
@ 2023-05-04  6:59 luhongfei
  0 siblings, 0 replies; only message in thread
From: luhongfei @ 2023-05-04  6:59 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov, open list:IO_URING, open list
  Cc: opensource.kernel, luhongfei

Remove the check of data->free_work and data->do_work in io_wq_create
io_wq_create is only called in io_init_wq_offload, which has already
initialized free_work and do_work to io_wq_free_work and io_wq_submit_work
respectively, so there is no need to detect whether free_work and
do_work are null pointers in io_wq_create.

Signed-off-by: luhongfei <[email protected]>
---
 io_uring/io-wq.c | 2 --
 1 file changed, 2 deletions(-)
 mode change 100644 => 100755 io_uring/io-wq.c

diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index f81c0a7136a5..b978a058ea51
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -1143,8 +1143,6 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
 	int ret, node, i;
 	struct io_wq *wq;
 
-	if (WARN_ON_ONCE(!data->free_work || !data->do_work))
-		return ERR_PTR(-EINVAL);
 	if (WARN_ON_ONCE(!bounded))
 		return ERR_PTR(-EINVAL);
 
-- 
2.39.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-04  6:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04  6:59 [PATCH] Subject: io_uring: Remove the check of data->free_work and data->do_work in io_wq_create luhongfei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox