io_uring/rw: recycle buffers manually for non-mshot reads
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>pull/1354/merge
parent
ab6559bdbb
commit
d8e1dec2f8
|
|
@ -1026,6 +1026,8 @@ int io_read(struct io_kiocb *req, unsigned int issue_flags)
|
|||
if (ret >= 0)
|
||||
return kiocb_done(req, ret, issue_flags);
|
||||
|
||||
if (req->flags & REQ_F_BUFFERS_COMMIT)
|
||||
io_kbuf_recycle(req, req->buf_list, issue_flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue