io_uring/kbuf: open code __io_put_kbuf()
__io_put_kbuf() is a trivial wrapper, open code it into __io_put_kbufs(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/9dc17380272b48d56c95992c6f9eaacd5546e1d3.1738724373.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>pull/1188/head
parent
13ee854e7c
commit
e150e70fce
|
|
@ -68,11 +68,6 @@ bool io_kbuf_recycle_legacy(struct io_kiocb *req, unsigned issue_flags)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __io_put_kbuf(struct io_kiocb *req, int len, unsigned issue_flags)
|
|
||||||
{
|
|
||||||
__io_put_kbuf_list(req, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __user *io_provided_buffer_select(struct io_kiocb *req, size_t *len,
|
static void __user *io_provided_buffer_select(struct io_kiocb *req, size_t *len,
|
||||||
struct io_buffer_list *bl)
|
struct io_buffer_list *bl)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,6 @@ int io_register_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg);
|
||||||
int io_unregister_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg);
|
int io_unregister_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg);
|
||||||
int io_register_pbuf_status(struct io_ring_ctx *ctx, void __user *arg);
|
int io_register_pbuf_status(struct io_ring_ctx *ctx, void __user *arg);
|
||||||
|
|
||||||
void __io_put_kbuf(struct io_kiocb *req, int len, unsigned issue_flags);
|
|
||||||
|
|
||||||
bool io_kbuf_recycle_legacy(struct io_kiocb *req, unsigned issue_flags);
|
bool io_kbuf_recycle_legacy(struct io_kiocb *req, unsigned issue_flags);
|
||||||
|
|
||||||
struct io_mapped_region *io_pbuf_get_region(struct io_ring_ctx *ctx,
|
struct io_mapped_region *io_pbuf_get_region(struct io_ring_ctx *ctx,
|
||||||
|
|
@ -194,7 +192,7 @@ static inline unsigned int __io_put_kbufs(struct io_kiocb *req, int len,
|
||||||
if (!__io_put_kbuf_ring(req, len, nbufs))
|
if (!__io_put_kbuf_ring(req, len, nbufs))
|
||||||
ret |= IORING_CQE_F_BUF_MORE;
|
ret |= IORING_CQE_F_BUF_MORE;
|
||||||
} else {
|
} else {
|
||||||
__io_put_kbuf(req, len, issue_flags);
|
__io_put_kbuf_list(req, len);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue