target/user: Fix time calc in expired cmd processing
authorAndy Grover <agrover@redhat.com>
Fri, 13 Nov 2015 18:42:19 +0000 (10:42 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 29 Nov 2015 03:32:33 +0000 (19:32 -0800)
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>
drivers/target/target_core_user.c

index 937cebf7663324b53a7fa773f519403a3953b87d..41f9eb07817e0485243b0f6ddc6264196973367d 100644 (file)
@@ -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);