@@ -199,7 +199,7 @@ void __user *io_buffer_select(struct io_kiocb *req, size_t *len,
199
199
200
200
bl = io_buffer_get_list (ctx , req -> buf_index );
201
201
if (likely (bl )) {
202
- if (bl -> is_mapped )
202
+ if (bl -> is_buf_ring )
203
203
ret = io_ring_buffer_select (req , len , bl , issue_flags );
204
204
else
205
205
ret = io_provided_buffer_select (req , len , bl );
@@ -253,7 +253,7 @@ static int __io_remove_buffers(struct io_ring_ctx *ctx,
253
253
if (!nbufs )
254
254
return 0 ;
255
255
256
- if (bl -> is_mapped ) {
256
+ if (bl -> is_buf_ring ) {
257
257
i = bl -> buf_ring -> tail - bl -> head ;
258
258
if (bl -> is_mmap ) {
259
259
/*
@@ -274,7 +274,7 @@ static int __io_remove_buffers(struct io_ring_ctx *ctx,
274
274
}
275
275
/* make sure it's seen as empty */
276
276
INIT_LIST_HEAD (& bl -> buf_list );
277
- bl -> is_mapped = 0 ;
277
+ bl -> is_buf_ring = 0 ;
278
278
return i ;
279
279
}
280
280
@@ -361,7 +361,7 @@ int io_remove_buffers(struct io_kiocb *req, unsigned int issue_flags)
361
361
if (bl ) {
362
362
ret = - EINVAL ;
363
363
/* can't use provide/remove buffers command on mapped buffers */
364
- if (!bl -> is_mapped )
364
+ if (!bl -> is_buf_ring )
365
365
ret = __io_remove_buffers (ctx , bl , p -> nbufs );
366
366
}
367
367
io_ring_submit_unlock (ctx , issue_flags );
@@ -519,7 +519,7 @@ int io_provide_buffers(struct io_kiocb *req, unsigned int issue_flags)
519
519
}
520
520
}
521
521
/* can't add buffers via this command for a mapped buffer ring */
522
- if (bl -> is_mapped ) {
522
+ if (bl -> is_buf_ring ) {
523
523
ret = - EINVAL ;
524
524
goto err ;
525
525
}
@@ -575,7 +575,7 @@ static int io_pin_pbuf_ring(struct io_uring_buf_reg *reg,
575
575
bl -> buf_pages = pages ;
576
576
bl -> buf_nr_pages = nr_pages ;
577
577
bl -> buf_ring = br ;
578
- bl -> is_mapped = 1 ;
578
+ bl -> is_buf_ring = 1 ;
579
579
bl -> is_mmap = 0 ;
580
580
return 0 ;
581
581
error_unpin :
@@ -642,7 +642,7 @@ static int io_alloc_pbuf_ring(struct io_ring_ctx *ctx,
642
642
}
643
643
ibf -> inuse = 1 ;
644
644
bl -> buf_ring = ibf -> mem ;
645
- bl -> is_mapped = 1 ;
645
+ bl -> is_buf_ring = 1 ;
646
646
bl -> is_mmap = 1 ;
647
647
return 0 ;
648
648
}
@@ -688,7 +688,7 @@ int io_register_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg)
688
688
bl = io_buffer_get_list (ctx , reg .bgid );
689
689
if (bl ) {
690
690
/* if mapped buffer ring OR classic exists, don't allow */
691
- if (bl -> is_mapped || !list_empty (& bl -> buf_list ))
691
+ if (bl -> is_buf_ring || !list_empty (& bl -> buf_list ))
692
692
return - EEXIST ;
693
693
} else {
694
694
free_bl = bl = kzalloc (sizeof (* bl ), GFP_KERNEL );
@@ -730,7 +730,7 @@ int io_unregister_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg)
730
730
bl = io_buffer_get_list (ctx , reg .bgid );
731
731
if (!bl )
732
732
return - ENOENT ;
733
- if (!bl -> is_mapped )
733
+ if (!bl -> is_buf_ring )
734
734
return - EINVAL ;
735
735
736
736
__io_remove_buffers (ctx , bl , -1U );
@@ -757,7 +757,7 @@ int io_register_pbuf_status(struct io_ring_ctx *ctx, void __user *arg)
757
757
bl = io_buffer_get_list (ctx , buf_status .buf_group );
758
758
if (!bl )
759
759
return - ENOENT ;
760
- if (!bl -> is_mapped )
760
+ if (!bl -> is_buf_ring )
761
761
return - EINVAL ;
762
762
763
763
buf_status .head = bl -> head ;
0 commit comments