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@xxxxxx> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> --- fs/io_uring.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index ff3b803cf749..cc6b5173d886 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1569,7 +1569,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); } -- 2.35.1