]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: Revert "target/core: Inline transport_lun_remove_cmd()"
authorBart Van Assche <bvanassche@acm.org>
Mon, 10 Feb 2020 05:12:02 +0000 (21:12 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Feb 2020 23:49:39 +0000 (18:49 -0500)
commit5e01fe5b0e90ea4aea9ea6a048274f913702e9ff
tree51906595ade709e41efb4778e18ffb8300befd0b
parent9f9285b96014e47599924b03ab0c07fa1549e04b
scsi: Revert "target/core: Inline transport_lun_remove_cmd()"

Commit c566e4d238f1 postponed the percpu_ref_put(&se_cmd->se_lun->lun_ref)
call from command completion to the time when the final command reference
is dropped. That approach is not compatible with the iSCSI target driver
because the iSCSI target driver keeps the command with the highest stat_sn
after it has completed until the next command is received (see also
iscsit_ack_from_expstatsn()). Fix this regression by reverting commit
c566e4d238f1.

Fixes: c566e4d238f1 ("scsi: target/core: Inline transport_lun_remove_cmd()")
Cc: Pavel Zakharov <pavel.zakharov@delphix.com>
Cc: Mike Christie <mchristi@redhat.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200210051202.12934-1-bvanassche@acm.org
Reported-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_transport.c