iscsi-target: Fix double list_add with iscsit_alloc_buffs reject
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 17 Jan 2012 01:11:54 +0000 (17:11 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 18 Jan 2012 08:35:57 +0000 (08:35 +0000)
commitcd931ee62fd0258fc85c76a7c5499fe85e0f3436
tree3e98ce1d1fc20b0782dee6eea01e6db295d12503
parentc1ce4bd56f2846de55043374598fd929ad3b711b
iscsi-target: Fix double list_add with iscsit_alloc_buffs reject

This patch fixes a bug where the iscsit_add_reject_from_cmd() call
from a failure to iscsit_alloc_buffs() was incorrectly passing
add_to_conn=1 and causing a double list_add after iscsi_cmd->i_list
had already been added in iscsit_handle_scsi_cmd().

Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c