summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-05-01 20:31:56 +0200
committerJens Axboe <axboe@kernel.dk>2022-05-09 14:29:06 +0200
commit7ccba24d3bc084d891def1a6fea504e4cb327a8c (patch)
tree0f8345528553d5b572b6f963d41d04fcd00479d1
parentio_uring: eliminate the need to track provided buffer ID separately (diff)
downloadlinux-7ccba24d3bc084d891def1a6fea504e4cb327a8c.tar.xz
linux-7ccba24d3bc084d891def1a6fea504e4cb327a8c.zip
io_uring: don't clear req->kbuf when buffer selection is done
It's not needed as the REQ_F_BUFFER_SELECTED flag tracks the state of whether or not kbuf is valid, so just drop it. Suggested-by: Dylan Yudaken <dylany@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/io_uring.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 52641594a86b..22699cb359e9 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1463,7 +1463,6 @@ static unsigned int __io_put_kbuf(struct io_kiocb *req, struct list_head *list)
{
req->flags &= ~REQ_F_BUFFER_SELECTED;
list_add(&req->kbuf->list, list);
- req->kbuf = NULL;
return IORING_CQE_F_BUFFER | (req->buf_index << IORING_CQE_BUFFER_SHIFT);
}
@@ -1540,7 +1539,6 @@ static void io_kbuf_recycle(struct io_kiocb *req, unsigned issue_flags)
list_add(&buf->list, &bl->buf_list);
req->flags &= ~REQ_F_BUFFER_SELECTED;
req->buf_index = buf->bgid;
- req->kbuf = NULL;
io_ring_submit_unlock(ctx, issue_flags);
}