linux/drivers/target
Mike Christie a2b5d6f975 scsi: target: Fix LUN ref count handling
Fix two bugs in the LUN refcounting:

 1. For the TCM_WRITE_PROTECTED case we were returning an error after
    taking a ref to the LUN, but never dropping it (caller just send status
    and drops cmd ref).

 2. We still need to do a percpu_ref_tryget_live for the virt LUN 0 like we
    do for other LUNs, because the TPG code does the refcount/wait process
    like it does with other LUNs.

Link: https://lore.kernel.org/r/1604257174-4524-2-git-send-email-michael.christie@oracle.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-11-04 22:39:37 -05:00
..
iscsi SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
loopback scsi: target: loopback: Fix READ with data and sensebytes 2020-05-11 22:20:19 -04:00
sbp treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
tcm_fc scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
target_core_alua.c scsi: target: Make transport_flags per device 2020-05-07 22:39:21 -04:00
target_core_alua.h
target_core_configfs.c scsi: target: tcmu: Make pgr_support and alua_support attributes writable 2020-05-07 22:39:22 -04:00
target_core_device.c scsi: target: Fix LUN ref count handling 2020-11-04 22:39:37 -05:00
target_core_fabric_configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
target_core_fabric_lib.c scsi: target: Handle short iSIDs 2020-07-08 00:14:34 -04:00
target_core_file.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_file.h
target_core_hba.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_iblock.c target/iblock: fix holder printing in iblock_show_configfs_dev_params 2020-09-25 08:18:58 -06:00
target_core_iblock.h scsi: target/core: Use the SECTOR_SHIFT constant 2018-10-16 01:13:35 -04:00
target_core_internal.h scsi: target: Fix xcopy sess release leak 2020-07-08 00:14:34 -04:00
target_core_pr.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
target_core_pr.h scsi: target/core: Rework the SPC-2 reservation handling code 2019-04-12 20:20:05 -04:00
target_core_pscsi.c scsi: target: Make transport_flags per device 2020-05-07 22:39:21 -04:00
target_core_pscsi.h
target_core_rd.c scsi: target: rd: Drop double zeroing 2020-10-07 23:50:03 -04:00
target_core_rd.h
target_core_sbc.c scsi: target: Return COMPARE AND WRITE miscompare offsets 2020-11-04 22:02:43 -05:00
target_core_spc.c scsi: target: use an enum to track emulate_ua_intlck_ctrl 2020-02-21 17:37:16 -05:00
target_core_stat.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_tmr.c scsi: target: Add tmr_notify backend function 2020-07-28 22:25:26 -04:00
target_core_tpg.c scsi: target: Make transport_flags per device 2020-05-07 22:39:21 -04:00
target_core_transport.c scsi: target: Return COMPARE AND WRITE miscompare offsets 2020-11-04 22:02:43 -05:00
target_core_ua.c scsi: target: use an enum to track emulate_ua_intlck_ctrl 2020-02-21 17:37:16 -05:00
target_core_ua.h
target_core_user.c scsi: target: tcmu: scatter_/gather_data_area() rework 2020-10-26 18:27:44 -04:00
target_core_xcopy.c scsi: target: Fix xcopy sess release leak 2020-07-08 00:14:34 -04:00
target_core_xcopy.h scsi: target: use the stack for XCOPY passthrough cmds 2020-03-29 18:10:59 -04:00