| 465 | } |
| 466 | |
| 467 | __cold void io_uring_queue_exit(struct io_uring *ring) |
| 468 | { |
| 469 | struct io_uring_sq *sq = &ring->sq; |
| 470 | struct io_uring_cq *cq = &ring->cq; |
| 471 | |
| 472 | if (!(ring->int_flags & INT_FLAG_APP_MEM)) { |
| 473 | __sys_munmap(sq->sqes, sq->sqes_sz); |
| 474 | io_uring_unmap_rings(sq, cq); |
| 475 | } |
| 476 | |
| 477 | /* |
| 478 | * Not strictly required, but frees up the slot we used now rather |
| 479 | * than at process exit time. |
| 480 | */ |
| 481 | if (ring->int_flags & INT_FLAG_REG_RING) |
| 482 | io_uring_unregister_ring_fd(ring); |
| 483 | if (ring->ring_fd != -1) |
| 484 | __sys_close(ring->ring_fd); |
| 485 | } |
| 486 | |
| 487 | __cold struct io_uring_probe *io_uring_get_probe_ring(struct io_uring *ring) |
| 488 | { |