Skip to content

Commit

Permalink
target/user: Fix time calc in expired cmd processing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Grover authored and Nicholas Bellinger committed Nov 29, 2015
1 parent 1ec2183 commit 611e226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static int tcmu_check_expired_cmd(int id, void *p, void *data)
if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags))
return 0;

if (!time_after(cmd->deadline, jiffies))
if (!time_after(jiffies, cmd->deadline))
return 0;

set_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags);
Expand Down

0 comments on commit 611e226

Please sign in to comment.