iscsi-target: Fix processing of OOO commands
authorShlomo Pongratz <shlomop@mellanox.com>
Sun, 5 May 2013 14:36:26 +0000 (17:36 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 30 May 2013 13:34:53 +0000 (14:34 +0100)
commit414ab9225762097a2ba0aedbc29802fc176f63e4
treeceacce72aa74326db5d0d88f3d729c21e3e4c582
parentfcc6acda6626851e42aa3c74d9b8d3dfe49d87d1
iscsi-target: Fix processing of OOO commands

commit 3eccfdb01da58fbd0f789ae6ca61cee3769e26de upstream.

Fix two issues in OOO commands processing done at iscsit_attach_ooo_cmdsn.

Handle command serial numbers wrap around by using iscsi_sna_lt and not regular comparisson.

The routine iterates until it finds an entry whose serial number is greater than the serial number of
the new one, thus the new entry should be inserted before that entry and not after.

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/target/iscsi/iscsi_target_erl1.c