From: Jens Axboe Date: Wed, 12 Feb 2025 21:05:11 +0000 (-0700) Subject: io_uring/uring_cmd: remove dead req_has_async_data() check X-Git-Tag: v6.12.16~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98d6ee3e305e8317827232acb98367e8f0814267;p=thirdparty%2Fkernel%2Fstable.git io_uring/uring_cmd: remove dead req_has_async_data() check [ Upstream commit 0edf1283a9d1419a2095b4fcdd95c11ac00a191c ] 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 Signed-off-by: Sasha Levin --- diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index 874f9e2defd58..b2ce4b5610027 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -65,9 +65,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;