summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Sander Mateos <csander@purestorage.com>2025-06-20 09:09:59 -0600
committerJens Axboe <axboe@kernel.dk>2025-06-30 16:02:46 -0600
commitbe4f1b619f5a7fa1f5641c780bfec1a156c279cb (patch)
tree5cf37eb7295c11700fb43559ee96e9f40ddb58a6
parentee97736384beccc1f72116718af23e5f6de75210 (diff)
ublk: remove task variable from __ublk_ch_uring_cmd()
The variable is computed from a simple expression and used once, so just replace it with the expression. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20250620151008.3976463-6-csander@purestorage.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/block/ublk_drv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index c2f83036aacf..d8985d49a05b 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -2189,7 +2189,6 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
const struct ublksrv_io_cmd *ub_cmd)
{
struct ublk_device *ub = cmd->file->private_data;
- struct task_struct *task;
struct ublk_queue *ubq;
struct ublk_io *io;
u32 cmd_op = cmd->cmd_op;
@@ -2225,8 +2224,7 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
return -EIOCBQUEUED;
}
- task = READ_ONCE(io->task);
- if (task != current)
+ if (READ_ONCE(io->task) != current)
goto out;
/* there is pending io cmd, something must be wrong */