OSDN Git Service

io_uring: comment why inline complete calls io_clean_op()
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 24 Sep 2021 21:00:03 +0000 (22:00 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:54 +0000 (05:49 -0600)
io_req_complete_state() calls io_clean_op() and it may be not entirely
obvious, leave a comment.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/21806f862151e223fdf439e5e8ed7178a8d66979.1632516769.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index eff24d8..5a06063 100644 (file)
@@ -1822,6 +1822,7 @@ static void io_req_complete_state(struct io_kiocb *req, long res,
 {
        struct io_submit_state *state;
 
+       /* clean per-opcode space, because req->compl is aliased with it */
        if (io_req_needs_clean(req))
                io_clean_op(req);
        req->result = res;