diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-10-30 16:51:58 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-11-02 22:45:30 +0100 |
commit | d50f94d761a5d9a34e03a86e512e19d88cbeaf06 (patch) | |
tree | 7b7bc09d5f47e085122e8aa1f9da6c356c7da504 /io_uring/notif.c | |
parent | io_uring/rsrc: add io_reset_rsrc_node() helper (diff) | |
download | linux-d50f94d761a5d9a34e03a86e512e19d88cbeaf06.tar.xz linux-d50f94d761a5d9a34e03a86e512e19d88cbeaf06.zip |
io_uring/rsrc: get rid of the empty node and dummy_ubuf
The empty node was used as a placeholder for a sparse entry, but it
didn't really solve any issues. The caller still has to check for
whether it's the empty node or not, it may as well just check for a NULL
return instead.
The dummy_ubuf was used for a sparse buffer entry, but NULL will serve
the same purpose there of ensuring an -EFAULT on attempted import.
Just use NULL for a sparse node, regardless of whether or not it's a
file or buffer resource.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/notif.c')
-rw-r--r-- | io_uring/notif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/notif.c b/io_uring/notif.c index 44bf21c0f810..4f02e969cf08 100644 --- a/io_uring/notif.c +++ b/io_uring/notif.c @@ -117,8 +117,8 @@ struct io_kiocb *io_alloc_notif(struct io_ring_ctx *ctx) notif->file = NULL; notif->task = current; io_get_task_refs(1); - notif->rsrc_nodes[IORING_RSRC_FILE] = rsrc_empty_node; - notif->rsrc_nodes[IORING_RSRC_BUFFER] = rsrc_empty_node; + notif->rsrc_nodes[IORING_RSRC_FILE] = NULL; + notif->rsrc_nodes[IORING_RSRC_BUFFER] = NULL; nd = io_notif_to_data(notif); nd->zc_report = false; |