Skip to content

Commit 611e226

Browse files
Andy GroverNicholas Bellinger
authored andcommitted
target/user: Fix time calc in expired cmd processing
Reversed arguments meant that we were doing nothing for cmds whose deadline had passed. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent 1ec2183 commit 611e226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/target/target_core_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ static int tcmu_check_expired_cmd(int id, void *p, void *data)
638638
if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags))
639639
return 0;
640640

641-
if (!time_after(cmd->deadline, jiffies))
641+
if (!time_after(jiffies, cmd->deadline))
642642
return 0;
643643

644644
set_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags);

0 commit comments

Comments
 (0)