iscsi-target: Fix processing of OOO commands
authorShlomo Pongratz <shlomop@mellanox.com>
Sun, 5 May 2013 14:36:26 +0000 (17:36 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 7 May 2013 23:51:58 +0000 (16:51 -0700)
commit3eccfdb01da58fbd0f789ae6ca61cee3769e26de
treed737a4dd65cfa7754277ae53a97fc8109c831b99
parent80690fdb959a652e02d4f40a684bd39586be9f32
iscsi-target: Fix processing of OOO commands

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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_erl1.c