Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring: pass in counter to handle_tw_list() rather than return it

No functional changes in this patch, just in preparation for returning
something other than count from this helper.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

+3 -5
+3 -5
io_uring/io_uring.c
··· 1173 1173 percpu_ref_put(&ctx->refs); 1174 1174 } 1175 1175 1176 - static unsigned int handle_tw_list(struct llist_node *node) 1176 + static void handle_tw_list(struct llist_node *node, unsigned int *count) 1177 1177 { 1178 1178 struct io_ring_ctx *ctx = NULL; 1179 1179 struct io_tw_state ts = { }; 1180 - unsigned int count = 0; 1181 1180 1182 1181 do { 1183 1182 struct llist_node *next = node->next; ··· 1194 1195 io_poll_task_func, io_req_rw_complete, 1195 1196 req, &ts); 1196 1197 node = next; 1197 - count++; 1198 + (*count)++; 1198 1199 if (unlikely(need_resched())) { 1199 1200 ctx_flush_and_put(ctx, &ts); 1200 1201 ctx = NULL; ··· 1203 1204 } while (node); 1204 1205 1205 1206 ctx_flush_and_put(ctx, &ts); 1206 - return count; 1207 1207 } 1208 1208 1209 1209 /** ··· 1261 1263 1262 1264 node = llist_del_all(&tctx->task_list); 1263 1265 if (node) 1264 - count = handle_tw_list(llist_reverse_order(node)); 1266 + handle_tw_list(llist_reverse_order(node), &count); 1265 1267 1266 1268 /* relaxed read is enough as only the task itself sets ->in_cancel */ 1267 1269 if (unlikely(atomic_read(&tctx->in_cancel)))