diff mbox series

Subject: io_uring: Remove the check of data->free_work and data->do_work in io_wq_create

Message ID 20230504065906.46574-1-luhongfei@vivo.com (mailing list archive)
State New
Headers show
Series Subject: io_uring: Remove the check of data->free_work and data->do_work in io_wq_create | expand

Commit Message

Lu Hongfei May 4, 2023, 6:59 a.m. UTC
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 <luhongfei@vivo.com>
---
 io_uring/io-wq.c | 2 --
 1 file changed, 2 deletions(-)
 mode change 100644 => 100755 io_uring/io-wq.c
diff mbox series

Patch

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);