From 6b7f864bb70591b1ba8f538c13de2a8396bfec8a Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Mon, 8 Apr 2024 00:54:56 +0100 Subject: io_uring/net: get rid of io_notif_complete_tw_ext io_notif_complete_tw_ext() can be removed and combined with io_notif_complete_tw to make it simpler without sacrificing anything. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/025a124a5e20e2474a57e2f04f16c422eb83063c.1712534031.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- io_uring/notif.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'io_uring/notif.h') diff --git a/io_uring/notif.h b/io_uring/notif.h index 86d32bd9f856..52e124a9957c 100644 --- a/io_uring/notif.h +++ b/io_uring/notif.h @@ -20,7 +20,7 @@ struct io_notif_data { }; struct io_kiocb *io_alloc_notif(struct io_ring_ctx *ctx); -void io_notif_set_extended(struct io_kiocb *notif); +void io_notif_tw_complete(struct io_kiocb *notif, struct io_tw_state *ts); static inline struct io_notif_data *io_notif_to_data(struct io_kiocb *notif) { @@ -33,8 +33,10 @@ static inline void io_notif_flush(struct io_kiocb *notif) struct io_notif_data *nd = io_notif_to_data(notif); /* drop slot's master ref */ - if (refcount_dec_and_test(&nd->uarg.refcnt)) + if (refcount_dec_and_test(&nd->uarg.refcnt)) { + notif->io_task_work.func = io_notif_tw_complete; __io_req_task_work_add(notif, IOU_F_TWQ_LAZY_WAKE); + } } static inline int io_notif_account_mem(struct io_kiocb *notif, unsigned len) -- cgit v1.2.3