1
0

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>
This commit is contained in:
Caleb Sander Mateos
2025-06-20 09:09:59 -06:00
committed by Jens Axboe
parent ee97736384
commit be4f1b619f

View File

@@ -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 */