summaryrefslogtreecommitdiff
path: root/io_uring/notif.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2024-04-19 14:08:41 +0300
committerJens Axboe <axboe@kernel.dk>2024-04-23 04:31:18 +0300
commit5a569469b973cb7a6c58192a37dfb8418686e518 (patch)
tree3be0dd2887479a46493b224cfef81f48c8e47957 /io_uring/notif.h
parent3830fff39941bd41f50d3bb8355883276d7b0771 (diff)
downloadlinux-5a569469b973cb7a6c58192a37dfb8418686e518.tar.xz
io_uring/notif: simplify io_notif_flush()
io_notif_flush() is partially duplicating io_tx_ubuf_complete(), so instead of duplicating it, make the flush call io_tx_ubuf_complete. Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/19e41652c16718b946a5c80d2ad409df7682e47e.1713369317.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.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/io_uring/notif.h b/io_uring/notif.h
index 2e25a2fc77d1..2cf9ff6abd7a 100644
--- a/io_uring/notif.h
+++ b/io_uring/notif.h
@@ -21,7 +21,8 @@ struct io_notif_data {
};
struct io_kiocb *io_alloc_notif(struct io_ring_ctx *ctx);
-void io_notif_tw_complete(struct io_kiocb *notif, struct io_tw_state *ts);
+void io_tx_ubuf_complete(struct sk_buff *skb, struct ubuf_info *uarg,
+ bool success);
static inline struct io_notif_data *io_notif_to_data(struct io_kiocb *notif)
{
@@ -33,11 +34,7 @@ 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)) {
- notif->io_task_work.func = io_notif_tw_complete;
- __io_req_task_work_add(notif, IOU_F_TWQ_LAZY_WAKE);
- }
+ io_tx_ubuf_complete(NULL, &nd->uarg, true);
}
static inline int io_notif_account_mem(struct io_kiocb *notif, unsigned len)