We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 991468d commit 44eff40Copy full SHA for 44eff40
fs/io_uring.c
@@ -1279,8 +1279,17 @@ static void io_prep_async_link(struct io_kiocb *req)
1279
{
1280
struct io_kiocb *cur;
1281
1282
- io_for_each_link(cur, req)
1283
- io_prep_async_work(cur);
+ if (req->flags & REQ_F_LINK_TIMEOUT) {
+ struct io_ring_ctx *ctx = req->ctx;
1284
+
1285
+ spin_lock_irq(&ctx->completion_lock);
1286
+ io_for_each_link(cur, req)
1287
+ io_prep_async_work(cur);
1288
+ spin_unlock_irq(&ctx->completion_lock);
1289
+ } else {
1290
1291
1292
+ }
1293
}
1294
1295
static void io_queue_async_work(struct io_kiocb *req)
0 commit comments