On 3/16/22 8:03 PM, Pavel Begunkov wrote: > It's never a good idea to put provided buffers without notifying the > userspace, it'll lead to userspace leaks, so add io_put_kbuf() in > io_req_complete_failed(). The fail helper is called by all sorts of > requests, but it's still safe to do as io_put_kbuf() will return 0 in > for all requests that don't support and so don't expect provided buffers. > > btw, remove some code duplication from kiocb_done(). This really would be nicer as two patches... -- Jens Axboe