@@ -199,7 +199,7 @@ void __user *io_buffer_select(struct io_kiocb *req, size_t *len,
199199
200200 bl = io_buffer_get_list (ctx , req -> buf_index );
201201 if (likely (bl )) {
202- if (bl -> is_mapped )
202+ if (bl -> is_buf_ring )
203203 ret = io_ring_buffer_select (req , len , bl , issue_flags );
204204 else
205205 ret = io_provided_buffer_select (req , len , bl );
@@ -253,7 +253,7 @@ static int __io_remove_buffers(struct io_ring_ctx *ctx,
253253 if (!nbufs )
254254 return 0 ;
255255
256- if (bl -> is_mapped ) {
256+ if (bl -> is_buf_ring ) {
257257 i = bl -> buf_ring -> tail - bl -> head ;
258258 if (bl -> is_mmap ) {
259259 /*
@@ -274,7 +274,7 @@ static int __io_remove_buffers(struct io_ring_ctx *ctx,
274274 }
275275 /* make sure it's seen as empty */
276276 INIT_LIST_HEAD (& bl -> buf_list );
277- bl -> is_mapped = 0 ;
277+ bl -> is_buf_ring = 0 ;
278278 return i ;
279279 }
280280
@@ -361,7 +361,7 @@ int io_remove_buffers(struct io_kiocb *req, unsigned int issue_flags)
361361 if (bl ) {
362362 ret = - EINVAL ;
363363 /* can't use provide/remove buffers command on mapped buffers */
364- if (!bl -> is_mapped )
364+ if (!bl -> is_buf_ring )
365365 ret = __io_remove_buffers (ctx , bl , p -> nbufs );
366366 }
367367 io_ring_submit_unlock (ctx , issue_flags );
@@ -519,7 +519,7 @@ int io_provide_buffers(struct io_kiocb *req, unsigned int issue_flags)
519519 }
520520 }
521521 /* can't add buffers via this command for a mapped buffer ring */
522- if (bl -> is_mapped ) {
522+ if (bl -> is_buf_ring ) {
523523 ret = - EINVAL ;
524524 goto err ;
525525 }
@@ -575,7 +575,7 @@ static int io_pin_pbuf_ring(struct io_uring_buf_reg *reg,
575575 bl -> buf_pages = pages ;
576576 bl -> buf_nr_pages = nr_pages ;
577577 bl -> buf_ring = br ;
578- bl -> is_mapped = 1 ;
578+ bl -> is_buf_ring = 1 ;
579579 bl -> is_mmap = 0 ;
580580 return 0 ;
581581error_unpin :
@@ -642,7 +642,7 @@ static int io_alloc_pbuf_ring(struct io_ring_ctx *ctx,
642642 }
643643 ibf -> inuse = 1 ;
644644 bl -> buf_ring = ibf -> mem ;
645- bl -> is_mapped = 1 ;
645+ bl -> is_buf_ring = 1 ;
646646 bl -> is_mmap = 1 ;
647647 return 0 ;
648648}
@@ -688,7 +688,7 @@ int io_register_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg)
688688 bl = io_buffer_get_list (ctx , reg .bgid );
689689 if (bl ) {
690690 /* 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 ))
692692 return - EEXIST ;
693693 } else {
694694 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)
730730 bl = io_buffer_get_list (ctx , reg .bgid );
731731 if (!bl )
732732 return - ENOENT ;
733- if (!bl -> is_mapped )
733+ if (!bl -> is_buf_ring )
734734 return - EINVAL ;
735735
736736 __io_remove_buffers (ctx , bl , -1U );
@@ -757,7 +757,7 @@ int io_register_pbuf_status(struct io_ring_ctx *ctx, void __user *arg)
757757 bl = io_buffer_get_list (ctx , buf_status .buf_group );
758758 if (!bl )
759759 return - ENOENT ;
760- if (!bl -> is_mapped )
760+ if (!bl -> is_buf_ring )
761761 return - EINVAL ;
762762
763763 buf_status .head = bl -> head ;
0 commit comments