@@ -1035,7 +1035,7 @@ static void io_dismantle_req(struct io_kiocb *req);
1035
1035
static void io_put_task (struct task_struct * task , int nr );
1036
1036
static struct io_kiocb * io_prep_linked_timeout (struct io_kiocb * req );
1037
1037
static void io_queue_linked_timeout (struct io_kiocb * req );
1038
- static int __io_register_rsrc_update (struct io_ring_ctx * ctx , unsigned opcode ,
1038
+ static int __io_register_rsrc_update (struct io_ring_ctx * ctx , unsigned type ,
1039
1039
struct io_uring_rsrc_update * up ,
1040
1040
unsigned nr_args );
1041
1041
static void io_clean_op (struct io_kiocb * req );
@@ -5824,7 +5824,7 @@ static int io_files_update(struct io_kiocb *req, unsigned int issue_flags)
5824
5824
up .data = req -> rsrc_update .arg ;
5825
5825
5826
5826
mutex_lock (& ctx -> uring_lock );
5827
- ret = __io_register_rsrc_update (ctx , IORING_REGISTER_FILES_UPDATE ,
5827
+ ret = __io_register_rsrc_update (ctx , IORING_RSRC_FILE ,
5828
5828
& up , req -> rsrc_update .nr_args );
5829
5829
mutex_unlock (& ctx -> uring_lock );
5830
5830
@@ -9709,7 +9709,7 @@ static int io_register_enable_rings(struct io_ring_ctx *ctx)
9709
9709
return 0 ;
9710
9710
}
9711
9711
9712
- static int __io_register_rsrc_update (struct io_ring_ctx * ctx , unsigned opcode ,
9712
+ static int __io_register_rsrc_update (struct io_ring_ctx * ctx , unsigned type ,
9713
9713
struct io_uring_rsrc_update * up ,
9714
9714
unsigned nr_args )
9715
9715
{
@@ -9722,14 +9722,14 @@ static int __io_register_rsrc_update(struct io_ring_ctx *ctx, unsigned opcode,
9722
9722
if (err )
9723
9723
return err ;
9724
9724
9725
- switch (opcode ) {
9726
- case IORING_REGISTER_FILES_UPDATE :
9725
+ switch (type ) {
9726
+ case IORING_RSRC_FILE :
9727
9727
return __io_sqe_files_update (ctx , up , nr_args );
9728
9728
}
9729
9729
return - EINVAL ;
9730
9730
}
9731
9731
9732
- static int io_register_rsrc_update (struct io_ring_ctx * ctx , unsigned opcode ,
9732
+ static int io_register_rsrc_update (struct io_ring_ctx * ctx , unsigned type ,
9733
9733
void __user * arg , unsigned nr_args )
9734
9734
{
9735
9735
struct io_uring_rsrc_update up ;
@@ -9740,7 +9740,7 @@ static int io_register_rsrc_update(struct io_ring_ctx *ctx, unsigned opcode,
9740
9740
return - EFAULT ;
9741
9741
if (up .resv )
9742
9742
return - EINVAL ;
9743
- return __io_register_rsrc_update (ctx , opcode , & up , nr_args );
9743
+ return __io_register_rsrc_update (ctx , type , & up , nr_args );
9744
9744
}
9745
9745
9746
9746
static bool io_register_op_must_quiesce (int op )
@@ -9829,7 +9829,7 @@ static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode,
9829
9829
ret = io_sqe_files_unregister (ctx );
9830
9830
break ;
9831
9831
case IORING_REGISTER_FILES_UPDATE :
9832
- ret = io_register_rsrc_update (ctx , opcode , arg , nr_args );
9832
+ ret = io_register_rsrc_update (ctx , IORING_RSRC_FILE , arg , nr_args );
9833
9833
break ;
9834
9834
case IORING_REGISTER_EVENTFD :
9835
9835
case IORING_REGISTER_EVENTFD_ASYNC :
0 commit comments