io_uring: let to set a range for file slot allocation
[platform/kernel/linux-starfive.git] / io_uring / io_uring.c
index 070ee9e..7452649 100644 (file)
@@ -3866,6 +3866,12 @@ static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode,
                        break;
                ret = io_sync_cancel(ctx, arg);
                break;
+       case IORING_REGISTER_FILE_ALLOC_RANGE:
+               ret = -EINVAL;
+               if (!arg || nr_args)
+                       break;
+               ret = io_register_file_alloc_range(ctx, arg);
+               break;
        default:
                ret = -EINVAL;
                break;