| 319 | } |
| 320 | |
| 321 | int io_uring_close_ring_fd(struct io_uring *ring) |
| 322 | { |
| 323 | if (!(ring->features & IORING_FEAT_REG_REG_RING)) |
| 324 | return -EOPNOTSUPP; |
| 325 | if (!(ring->int_flags & INT_FLAG_REG_RING)) |
| 326 | return -EINVAL; |
| 327 | if (ring->ring_fd == -1) |
| 328 | return -EBADF; |
| 329 | |
| 330 | __sys_close(ring->ring_fd); |
| 331 | ring->ring_fd = -1; |
| 332 | return 1; |
| 333 | } |
| 334 | |
| 335 | int io_uring_register_buf_ring(struct io_uring *ring, |
| 336 | struct io_uring_buf_reg *reg, |