Skip to content

Commit bb9d08e

Browse files
calebsanderkawasaki
authored andcommitted
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 <[email protected]> Reviewed-by: Ming Lei <[email protected]>
1 parent cfc1ece commit bb9d08e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/block/ublk_drv.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,6 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
21722172
const struct ublksrv_io_cmd *ub_cmd)
21732173
{
21742174
struct ublk_device *ub = cmd->file->private_data;
2175-
struct task_struct *task;
21762175
struct ublk_queue *ubq;
21772176
struct ublk_io *io;
21782177
u32 cmd_op = cmd->cmd_op;
@@ -2207,8 +2206,7 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
22072206
return -EIOCBQUEUED;
22082207
}
22092208

2210-
task = READ_ONCE(io->task);
2211-
if (task != current)
2209+
if (READ_ONCE(io->task) != current)
22122210
goto out;
22132211

22142212
/* there is pending io cmd, something must be wrong */

0 commit comments

Comments
 (0)