io_uring/uring_cmd: remove dead req_has_async_data() check
authorJens Axboe <axboe@kernel.dk>
Wed, 12 Feb 2025 21:05:11 +0000 (14:05 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 12 Feb 2025 22:39:34 +0000 (15:39 -0700)
Any uring_cmd always has async data allocated now, there's no reason to
check and clear a cached copy of the SQE.

Fixes: d10f19dff56e ("io_uring/uring_cmd: switch to always allocating async data")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/uring_cmd.c

index bcfca18395c4c8c9d1316aa401d01b0c7890ad6a..8af7780407b7e7fb51a9a0104d2d5de546272bc5 100644 (file)
@@ -54,9 +54,6 @@ bool io_uring_try_cancel_uring_cmd(struct io_ring_ctx *ctx,
                        continue;
 
                if (cmd->flags & IORING_URING_CMD_CANCELABLE) {
-                       /* ->sqe isn't available if no async data */
-                       if (!req_has_async_data(req))
-                               cmd->sqe = NULL;
                        file->f_op->uring_cmd(cmd, IO_URING_F_CANCEL |
                                                   IO_URING_F_COMPLETE_DEFER);
                        ret = true;