Skip to content

Commit ceab30f

Browse files
axboegregkh
authored andcommitted
io_uring/rw: recycle buffers manually for non-mshot reads
Commit d8e1dec upstream. The mshot side of reads already does this, but the regular read path does not. This leads to needing recycling checks sprinkled in various spots in the "go async" path, like arming poll. In preparation for getting rid of those, ensure that read recycles appropriately. Link: https://lore.kernel.org/r/20250821020750.598432-8-axboe@kernel.dk Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4ce768a commit ceab30f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

io_uring/rw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,8 @@ int io_read(struct io_kiocb *req, unsigned int issue_flags)
953953
if (ret >= 0)
954954
return kiocb_done(req, ret, issue_flags);
955955

956+
if (req->flags & REQ_F_BUFFERS_COMMIT)
957+
io_kbuf_recycle(req, issue_flags);
956958
return ret;
957959
}
958960

0 commit comments

Comments
 (0)