@@ -844,6 +844,7 @@ enum {
844
844
REQ_F_SINGLE_POLL_BIT ,
845
845
REQ_F_DOUBLE_POLL_BIT ,
846
846
REQ_F_PARTIAL_IO_BIT ,
847
+ REQ_F_CQE32_INIT_BIT ,
847
848
REQ_F_APOLL_MULTISHOT_BIT ,
848
849
/* keep async read/write and isreg together and in order */
849
850
REQ_F_SUPPORT_NOWAIT_BIT ,
@@ -913,6 +914,8 @@ enum {
913
914
REQ_F_PARTIAL_IO = BIT (REQ_F_PARTIAL_IO_BIT ),
914
915
/* fast poll multishot mode */
915
916
REQ_F_APOLL_MULTISHOT = BIT (REQ_F_APOLL_MULTISHOT_BIT ),
917
+ /* ->extra1 and ->extra2 are initialised */
918
+ REQ_F_CQE32_INIT = BIT (REQ_F_CQE32_INIT_BIT ),
916
919
};
917
920
918
921
struct async_poll {
@@ -2488,8 +2491,12 @@ static inline bool __io_fill_cqe_req(struct io_ring_ctx *ctx,
2488
2491
req -> cqe .res , req -> cqe .flags ,
2489
2492
0 , 0 );
2490
2493
} else {
2491
- u64 extra1 = req -> extra1 ;
2492
- u64 extra2 = req -> extra2 ;
2494
+ u64 extra1 = 0 , extra2 = 0 ;
2495
+
2496
+ if (req -> flags & REQ_F_CQE32_INIT ) {
2497
+ extra1 = req -> extra1 ;
2498
+ extra2 = req -> extra2 ;
2499
+ }
2493
2500
2494
2501
trace_io_uring_complete (req -> ctx , req , req -> cqe .user_data ,
2495
2502
req -> cqe .res , req -> cqe .flags , extra1 , extra2 );
@@ -5019,6 +5026,7 @@ static inline void io_req_set_cqe32_extra(struct io_kiocb *req,
5019
5026
{
5020
5027
req -> extra1 = extra1 ;
5021
5028
req -> extra2 = extra2 ;
5029
+ req -> flags |= REQ_F_CQE32_INIT ;
5022
5030
}
5023
5031
5024
5032
/*
0 commit comments