Commit be4f1b61 authored by Caleb Sander Mateos's avatar Caleb Sander Mateos Committed by Jens Axboe
Browse files

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: default avatarCaleb Sander Mateos <csander@purestorage.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250620151008.3976463-6-csander@purestorage.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ee977363
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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 */