summaryrefslogtreecommitdiff
path: root/io_uring/notif.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2024-04-08 00:54:56 +0100
committerJens Axboe <axboe@kernel.dk>2024-04-15 08:10:26 -0600
commit6b7f864bb70591b1ba8f538c13de2a8396bfec8a (patch)
treed29bad983f41118383a1aae933809c0be3de81f8 /io_uring/notif.h
parent998632921d28a6d360d2a6d7ffcfbcf4f6f17fc2 (diff)
downloadlwn-6b7f864bb70591b1ba8f538c13de2a8396bfec8a.tar.gz
lwn-6b7f864bb70591b1ba8f538c13de2a8396bfec8a.zip
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 <asml.silence@gmail.com> Link: https://lore.kernel.org/r/025a124a5e20e2474a57e2f04f16c422eb83063c.1712534031.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/notif.h')
-rw-r--r--io_uring/notif.h6
1 files changed, 4 insertions, 2 deletions
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)