File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change 16
16
#include "rsrc.h"
17
17
#include "uring_cmd.h"
18
18
19
- static struct uring_cache * io_uring_async_get (struct io_kiocb * req )
20
- {
21
- struct io_ring_ctx * ctx = req -> ctx ;
22
- struct uring_cache * cache ;
23
-
24
- cache = io_alloc_cache_get (& ctx -> uring_cache );
25
- if (cache ) {
26
- req -> flags |= REQ_F_ASYNC_DATA ;
27
- req -> async_data = cache ;
28
- return cache ;
29
- }
30
- if (!io_alloc_async_data (req ))
31
- return req -> async_data ;
32
- return NULL ;
33
- }
34
-
35
19
static void io_req_uring_cleanup (struct io_kiocb * req , unsigned int issue_flags )
36
20
{
37
21
struct io_uring_cmd * ioucmd = io_kiocb_to_cmd (req , struct io_uring_cmd );
@@ -185,8 +169,8 @@ static int io_uring_cmd_prep_setup(struct io_kiocb *req,
185
169
struct io_uring_cmd * ioucmd = io_kiocb_to_cmd (req , struct io_uring_cmd );
186
170
struct uring_cache * cache ;
187
171
188
- cache = io_uring_async_get ( req );
189
- if (unlikely ( !cache ) )
172
+ cache = io_uring_alloc_async_data ( & req -> ctx -> uring_cache , req , NULL );
173
+ if (!cache )
190
174
return - ENOMEM ;
191
175
192
176
if (!(req -> flags & REQ_F_FORCE_ASYNC )) {
You can’t perform that action at this time.
0 commit comments