Lines Matching refs:nr_args

22 	u32				nr_args;  member
357 unsigned nr_args) in __io_sqe_files_update() argument
368 if (up->offset + nr_args > ctx->nr_user_files) in __io_sqe_files_update()
371 for (done = 0; done < nr_args; done++) { in __io_sqe_files_update()
432 unsigned int nr_args) in __io_sqe_buffers_update() argument
442 if (up->offset + nr_args > ctx->nr_user_bufs) in __io_sqe_buffers_update()
445 for (done = 0; done < nr_args; done++) { in __io_sqe_buffers_update()
486 unsigned nr_args) in __io_register_rsrc_update() argument
492 if (check_add_overflow(up->offset, nr_args, &tmp)) in __io_register_rsrc_update()
497 return __io_sqe_files_update(ctx, up, nr_args); in __io_register_rsrc_update()
499 return __io_sqe_buffers_update(ctx, up, nr_args); in __io_register_rsrc_update()
505 unsigned nr_args) in io_register_files_update() argument
509 if (!nr_args) in io_register_files_update()
516 return __io_register_rsrc_update(ctx, IORING_RSRC_FILE, &up, nr_args); in io_register_files_update()
575 up->nr_args = READ_ONCE(sqe->len); in io_files_update_prep()
576 if (!up->nr_args) in io_files_update_prep()
594 for (done = 0; done < up->nr_args; done++) { in io_files_update_with_index_alloc()
640 &up2, up->nr_args); in io_files_update()
853 unsigned nr_args, u64 __user *tags) in io_sqe_files_register() argument
862 if (!nr_args) in io_sqe_files_register()
864 if (nr_args > IORING_MAX_FIXED_FILES) in io_sqe_files_register()
866 if (nr_args > rlimit(RLIMIT_NOFILE)) in io_sqe_files_register()
868 ret = io_rsrc_data_alloc(ctx, IORING_RSRC_FILE, tags, nr_args, in io_sqe_files_register()
873 if (!io_alloc_file_tables(&ctx->file_table, nr_args)) { in io_sqe_files_register()
879 for (i = 0; i < nr_args; i++, ctx->nr_user_files++) { in io_sqe_files_register()
1163 static int io_buffers_map_alloc(struct io_ring_ctx *ctx, unsigned int nr_args) in io_buffers_map_alloc() argument
1165 ctx->user_bufs = kcalloc(nr_args, sizeof(*ctx->user_bufs), GFP_KERNEL); in io_buffers_map_alloc()
1170 unsigned int nr_args, u64 __user *tags) in io_sqe_buffers_register() argument
1181 if (!nr_args || nr_args > IORING_MAX_REG_BUFFERS) in io_sqe_buffers_register()
1183 ret = io_rsrc_data_alloc(ctx, IORING_RSRC_BUFFER, tags, nr_args, &data); in io_sqe_buffers_register()
1186 ret = io_buffers_map_alloc(ctx, nr_args); in io_sqe_buffers_register()
1192 for (i = 0; i < nr_args; i++, ctx->nr_user_bufs++) { in io_sqe_buffers_register()