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 1616#include "rsrc.h"
1717#include "uring_cmd.h"
1818
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-
3519static void io_req_uring_cleanup (struct io_kiocb * req , unsigned int issue_flags )
3620{
3721 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,
185169 struct io_uring_cmd * ioucmd = io_kiocb_to_cmd (req , struct io_uring_cmd );
186170 struct uring_cache * cache ;
187171
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 )
190174 return - ENOMEM ;
191175
192176 if (!(req -> flags & REQ_F_FORCE_ASYNC )) {
You can’t perform that action at this time.
0 commit comments