Commit 611e2267 authored by Andy Grover's avatar Andy Grover Committed by Nicholas Bellinger

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: default avatarAndy Grover <agrover@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 1ec21837
...@@ -638,7 +638,7 @@ static int tcmu_check_expired_cmd(int id, void *p, void *data) ...@@ -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)) if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags))
return 0; return 0;
if (!time_after(cmd->deadline, jiffies)) if (!time_after(jiffies, cmd->deadline))
return 0; return 0;
set_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags); set_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment