diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-21 14:24:38 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-21 14:24:38 -0400 |
| commit | e477f3e01304f011f2fbc416241439019bf890ea (patch) | |
| tree | 6e6c8742f374a3721a43bcda2551c4d12af96ad8 | |
| parent | da6b9a2049b46efdf8555eadbb22364f70eac848 (diff) | |
| parent | 9bc6548f372d8c829235095d91de99d8df79db6e (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
"Here are current target-pending fixes for v4.0-rc5 code that have made
their way into the queue over the last weeks.
The fixes this round include:
- Fix long-standing iser-target logout bug related to early
conn_logout_comp completion, resulting in iscsi_conn use-after-tree
OOpsen. (Sagi + nab)
- Fix long-standing tcm_fc bug in ft_invl_hw_context() failure
handing for DDP hw offload. (DanC)
- Fix incorrect use of unprotected __transport_register_session() in
tcm_qla2xxx + other single local se_node_acl fabrics. (Bart)
- Fix reference leak in target_submit_cmd() -> target_get_sess_cmd()
for ack_kref=1 failure path. (Bart)
- Fix pSCSI backend ->get_device_type() statistics OOPs with
un-configured device. (Olaf + nab)
- Fix virtual LUN=0 target_configure_device failure OOPs at modprobe
time. (Claudio + nab)
- Fix FUA write false positive failure regression in v4.0-rc1 code.
(Christophe Vu-Brugier + HCH)"
* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0
target: Fix virtual LUN=0 target_configure_device failure OOPs
target/pscsi: Fix NULL pointer dereference in get_device_type
tcm_fc: missing curly braces in ft_invl_hw_context()
target: Fix reference leak in target_get_sess_cmd() error path
loop/usb/vhost-scsi/xen-scsiback: Fix use of __transport_register_session
tcm_qla2xxx: Fix incorrect use of __transport_register_session
iscsi-target: Avoid early conn_logout_comp for iser connections
Revert "iscsi-target: Avoid IN_LOGOUT failure case for iser-target"
target: Disallow changing of WRITE cache/FUA attrs after export
| -rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 | ||||
| -rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 14 | ||||
| -rw-r--r-- | drivers/target/iscsi/iscsi_target_erl0.c | 4 | ||||
| -rw-r--r-- | drivers/target/loopback/tcm_loop.c | 7 | ||||
| -rw-r--r-- | drivers/target/target_core_device.c | 32 | ||||
| -rw-r--r-- | drivers/target/target_core_pscsi.c | 2 | ||||
| -rw-r--r-- | drivers/target/target_core_sbc.c | 3 | ||||
| -rw-r--r-- | drivers/target/target_core_spc.c | 19 | ||||
| -rw-r--r-- | drivers/target/target_core_transport.c | 4 | ||||
| -rw-r--r-- | drivers/target/tcm_fc/tfc_io.c | 3 | ||||
| -rw-r--r-- | drivers/usb/gadget/legacy/tcm_usb_gadget.c | 5 | ||||
| -rw-r--r-- | drivers/vhost/scsi.c | 5 | ||||
| -rw-r--r-- | drivers/xen/xen-scsiback.c | 7 | ||||
| -rw-r--r-- | include/target/target_core_backend.h | 1 |
14 files changed, 61 insertions, 47 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 99f43b7fc9ab..ab4879e12ea7 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
| @@ -1596,7 +1596,7 @@ static int tcm_qla2xxx_check_initiator_node_acl( | |||
| 1596 | /* | 1596 | /* |
| 1597 | * Finally register the new FC Nexus with TCM | 1597 | * Finally register the new FC Nexus with TCM |
| 1598 | */ | 1598 | */ |
| 1599 | __transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess); | 1599 | transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess); |
| 1600 | 1600 | ||
| 1601 | return 0; | 1601 | return 0; |
| 1602 | } | 1602 | } |
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 50bad55a0c42..2accb6e47beb 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
| @@ -4256,11 +4256,17 @@ int iscsit_close_connection( | |||
| 4256 | pr_debug("Closing iSCSI connection CID %hu on SID:" | 4256 | pr_debug("Closing iSCSI connection CID %hu on SID:" |
| 4257 | " %u\n", conn->cid, sess->sid); | 4257 | " %u\n", conn->cid, sess->sid); |
| 4258 | /* | 4258 | /* |
| 4259 | * Always up conn_logout_comp just in case the RX Thread is sleeping | 4259 | * Always up conn_logout_comp for the traditional TCP case just in case |
| 4260 | * and the logout response never got sent because the connection | 4260 | * the RX Thread in iscsi_target_rx_opcode() is sleeping and the logout |
| 4261 | * failed. | 4261 | * response never got sent because the connection failed. |
| 4262 | * | ||
| 4263 | * However for iser-target, isert_wait4logout() is using conn_logout_comp | ||
| 4264 | * to signal logout response TX interrupt completion. Go ahead and skip | ||
| 4265 | * this for iser since isert_rx_opcode() does not wait on logout failure, | ||
| 4266 | * and to avoid iscsi_conn pointer dereference in iser-target code. | ||
| 4262 | */ | 4267 | */ |
| 4263 | complete(&conn->conn_logout_comp); | 4268 | if (conn->conn_transport->transport_type == ISCSI_TCP) |
| 4269 | complete(&conn->conn_logout_comp); | ||
| 4264 | 4270 | ||
| 4265 | iscsi_release_thread_set(conn); | 4271 | iscsi_release_thread_set(conn); |
| 4266 | 4272 | ||
diff --git a/drivers/target/iscsi/iscsi_target_erl0.c b/drivers/target/iscsi/iscsi_target_erl0.c index 1c197bad6132..bdd8731a4daa 100644 --- a/drivers/target/iscsi/iscsi_target_erl0.c +++ b/drivers/target/iscsi/iscsi_target_erl0.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <target/target_core_fabric.h> | 22 | #include <target/target_core_fabric.h> |
| 23 | 23 | ||
| 24 | #include <target/iscsi/iscsi_target_core.h> | 24 | #include <target/iscsi/iscsi_target_core.h> |
| 25 | #include <target/iscsi/iscsi_transport.h> | ||
| 26 | #include "iscsi_target_seq_pdu_list.h" | 25 | #include "iscsi_target_seq_pdu_list.h" |
| 27 | #include "iscsi_target_tq.h" | 26 | #include "iscsi_target_tq.h" |
| 28 | #include "iscsi_target_erl0.h" | 27 | #include "iscsi_target_erl0.h" |
| @@ -940,8 +939,7 @@ void iscsit_take_action_for_connection_exit(struct iscsi_conn *conn) | |||
| 940 | 939 | ||
| 941 | if (conn->conn_state == TARG_CONN_STATE_IN_LOGOUT) { | 940 | if (conn->conn_state == TARG_CONN_STATE_IN_LOGOUT) { |
| 942 | spin_unlock_bh(&conn->state_lock); | 941 | spin_unlock_bh(&conn->state_lock); |
| 943 | if (conn->conn_transport->transport_type == ISCSI_TCP) | 942 | iscsit_close_connection(conn); |
| 944 | iscsit_close_connection(conn); | ||
| 945 | return; | 943 | return; |
| 946 | } | 944 | } |
| 947 | 945 | ||
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 6b3c32954689..c36bd7c29136 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
| @@ -953,11 +953,8 @@ static int tcm_loop_make_nexus( | |||
| 953 | transport_free_session(tl_nexus->se_sess); | 953 | transport_free_session(tl_nexus->se_sess); |
| 954 | goto out; | 954 | goto out; |
| 955 | } | 955 | } |
| 956 | /* | 956 | /* Now, register the SAS I_T Nexus as active. */ |
| 957 | * Now, register the SAS I_T Nexus as active with the call to | 957 | transport_register_session(se_tpg, tl_nexus->se_sess->se_node_acl, |
| 958 | * transport_register_session() | ||
| 959 | */ | ||
| 960 | __transport_register_session(se_tpg, tl_nexus->se_sess->se_node_acl, | ||
| 961 | tl_nexus->se_sess, tl_nexus); | 958 | tl_nexus->se_sess, tl_nexus); |
| 962 | tl_tpg->tl_nexus = tl_nexus; | 959 | tl_tpg->tl_nexus = tl_nexus; |
| 963 | pr_debug("TCM_Loop_ConfigFS: Established I_T Nexus to emulated" | 960 | pr_debug("TCM_Loop_ConfigFS: Established I_T Nexus to emulated" |
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 58f49ff69b14..79b4ec3ca2db 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c | |||
| @@ -650,6 +650,18 @@ static u32 se_dev_align_max_sectors(u32 max_sectors, u32 block_size) | |||
| 650 | return aligned_max_sectors; | 650 | return aligned_max_sectors; |
| 651 | } | 651 | } |
| 652 | 652 | ||
| 653 | bool se_dev_check_wce(struct se_device *dev) | ||
| 654 | { | ||
| 655 | bool wce = false; | ||
| 656 | |||
| 657 | if (dev->transport->get_write_cache) | ||
| 658 | wce = dev->transport->get_write_cache(dev); | ||
| 659 | else if (dev->dev_attrib.emulate_write_cache > 0) | ||
| 660 | wce = true; | ||
| 661 | |||
| 662 | return wce; | ||
| 663 | } | ||
| 664 | |||
| 653 | int se_dev_set_max_unmap_lba_count( | 665 | int se_dev_set_max_unmap_lba_count( |
| 654 | struct se_device *dev, | 666 | struct se_device *dev, |
| 655 | u32 max_unmap_lba_count) | 667 | u32 max_unmap_lba_count) |
| @@ -767,6 +779,16 @@ int se_dev_set_emulate_fua_write(struct se_device *dev, int flag) | |||
| 767 | pr_err("Illegal value %d\n", flag); | 779 | pr_err("Illegal value %d\n", flag); |
| 768 | return -EINVAL; | 780 | return -EINVAL; |
| 769 | } | 781 | } |
| 782 | if (flag && | ||
| 783 | dev->transport->get_write_cache) { | ||
| 784 | pr_err("emulate_fua_write not supported for this device\n"); | ||
| 785 | return -EINVAL; | ||
| 786 | } | ||
| 787 | if (dev->export_count) { | ||
| 788 | pr_err("emulate_fua_write cannot be changed with active" | ||
| 789 | " exports: %d\n", dev->export_count); | ||
| 790 | return -EINVAL; | ||
| 791 | } | ||
| 770 | dev->dev_attrib.emulate_fua_write = flag; | 792 | dev->dev_attrib.emulate_fua_write = flag; |
| 771 | pr_debug("dev[%p]: SE Device Forced Unit Access WRITEs: %d\n", | 793 | pr_debug("dev[%p]: SE Device Forced Unit Access WRITEs: %d\n", |
| 772 | dev, dev->dev_attrib.emulate_fua_write); | 794 | dev, dev->dev_attrib.emulate_fua_write); |
| @@ -801,7 +823,11 @@ int se_dev_set_emulate_write_cache(struct se_device *dev, int flag) | |||
| 801 | pr_err("emulate_write_cache not supported for this device\n"); | 823 | pr_err("emulate_write_cache not supported for this device\n"); |
| 802 | return -EINVAL; | 824 | return -EINVAL; |
| 803 | } | 825 | } |
| 804 | 826 | if (dev->export_count) { | |
| 827 | pr_err("emulate_write_cache cannot be changed with active" | ||
| 828 | " exports: %d\n", dev->export_count); | ||
| 829 | return -EINVAL; | ||
| 830 | } | ||
| 805 | dev->dev_attrib.emulate_write_cache = flag; | 831 | dev->dev_attrib.emulate_write_cache = flag; |
| 806 | pr_debug("dev[%p]: SE Device WRITE_CACHE_EMULATION flag: %d\n", | 832 | pr_debug("dev[%p]: SE Device WRITE_CACHE_EMULATION flag: %d\n", |
| 807 | dev, dev->dev_attrib.emulate_write_cache); | 833 | dev, dev->dev_attrib.emulate_write_cache); |
| @@ -1534,8 +1560,6 @@ int target_configure_device(struct se_device *dev) | |||
| 1534 | ret = dev->transport->configure_device(dev); | 1560 | ret = dev->transport->configure_device(dev); |
| 1535 | if (ret) | 1561 | if (ret) |
| 1536 | goto out; | 1562 | goto out; |
| 1537 | dev->dev_flags |= DF_CONFIGURED; | ||
| 1538 | |||
| 1539 | /* | 1563 | /* |
| 1540 | * XXX: there is not much point to have two different values here.. | 1564 | * XXX: there is not much point to have two different values here.. |
| 1541 | */ | 1565 | */ |
| @@ -1597,6 +1621,8 @@ int target_configure_device(struct se_device *dev) | |||
| 1597 | list_add_tail(&dev->g_dev_node, &g_device_list); | 1621 | list_add_tail(&dev->g_dev_node, &g_device_list); |
| 1598 | mutex_unlock(&g_device_mutex); | 1622 | mutex_unlock(&g_device_mutex); |
| 1599 | 1623 | ||
| 1624 | dev->dev_flags |= DF_CONFIGURED; | ||
| 1625 | |||
| 1600 | return 0; | 1626 | return 0; |
| 1601 | 1627 | ||
| 1602 | out_free_alua: | 1628 | out_free_alua: |
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 1045dcd7bf65..f6c954c4635f 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c | |||
| @@ -1121,7 +1121,7 @@ static u32 pscsi_get_device_type(struct se_device *dev) | |||
| 1121 | struct pscsi_dev_virt *pdv = PSCSI_DEV(dev); | 1121 | struct pscsi_dev_virt *pdv = PSCSI_DEV(dev); |
| 1122 | struct scsi_device *sd = pdv->pdv_sd; | 1122 | struct scsi_device *sd = pdv->pdv_sd; |
| 1123 | 1123 | ||
| 1124 | return sd->type; | 1124 | return (sd) ? sd->type : TYPE_NO_LUN; |
| 1125 | } | 1125 | } |
| 1126 | 1126 | ||
| 1127 | static sector_t pscsi_get_blocks(struct se_device *dev) | 1127 | static sector_t pscsi_get_blocks(struct se_device *dev) |
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index 9a2f9d3a6e70..3e7297411110 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c | |||
| @@ -708,8 +708,7 @@ sbc_check_dpofua(struct se_device *dev, struct se_cmd *cmd, unsigned char *cdb) | |||
| 708 | } | 708 | } |
| 709 | } | 709 | } |
| 710 | if (cdb[1] & 0x8) { | 710 | if (cdb[1] & 0x8) { |
| 711 | if (!dev->dev_attrib.emulate_fua_write || | 711 | if (!dev->dev_attrib.emulate_fua_write || !se_dev_check_wce(dev)) { |
| 712 | !dev->dev_attrib.emulate_write_cache) { | ||
| 713 | pr_err("Got CDB: 0x%02x with FUA bit set, but device" | 712 | pr_err("Got CDB: 0x%02x with FUA bit set, but device" |
| 714 | " does not advertise support for FUA write\n", | 713 | " does not advertise support for FUA write\n", |
| 715 | cdb[0]); | 714 | cdb[0]); |
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c index 460e93109473..6c8bd6bc175c 100644 --- a/drivers/target/target_core_spc.c +++ b/drivers/target/target_core_spc.c | |||
| @@ -454,19 +454,6 @@ check_scsi_name: | |||
| 454 | } | 454 | } |
| 455 | EXPORT_SYMBOL(spc_emulate_evpd_83); | 455 | EXPORT_SYMBOL(spc_emulate_evpd_83); |
| 456 | 456 | ||
| 457 | static bool | ||
| 458 | spc_check_dev_wce(struct se_device *dev) | ||
| 459 | { | ||
| 460 | bool wce = false; | ||
| 461 | |||
| 462 | if (dev->transport->get_write_cache) | ||
| 463 | wce = dev->transport->get_write_cache(dev); | ||
| 464 | else if (dev->dev_attrib.emulate_write_cache > 0) | ||
| 465 | wce = true; | ||
| 466 | |||
| 467 | return wce; | ||
| 468 | } | ||
| 469 | |||
| 470 | /* Extended INQUIRY Data VPD Page */ | 457 | /* Extended INQUIRY Data VPD Page */ |
| 471 | static sense_reason_t | 458 | static sense_reason_t |
| 472 | spc_emulate_evpd_86(struct se_cmd *cmd, unsigned char *buf) | 459 | spc_emulate_evpd_86(struct se_cmd *cmd, unsigned char *buf) |
| @@ -490,7 +477,7 @@ spc_emulate_evpd_86(struct se_cmd *cmd, unsigned char *buf) | |||
| 490 | buf[5] = 0x07; | 477 | buf[5] = 0x07; |
| 491 | 478 | ||
| 492 | /* If WriteCache emulation is enabled, set V_SUP */ | 479 | /* If WriteCache emulation is enabled, set V_SUP */ |
| 493 | if (spc_check_dev_wce(dev)) | 480 | if (se_dev_check_wce(dev)) |
| 494 | buf[6] = 0x01; | 481 | buf[6] = 0x01; |
| 495 | /* If an LBA map is present set R_SUP */ | 482 | /* If an LBA map is present set R_SUP */ |
| 496 | spin_lock(&cmd->se_dev->t10_alua.lba_map_lock); | 483 | spin_lock(&cmd->se_dev->t10_alua.lba_map_lock); |
| @@ -897,7 +884,7 @@ static int spc_modesense_caching(struct se_cmd *cmd, u8 pc, u8 *p) | |||
| 897 | if (pc == 1) | 884 | if (pc == 1) |
| 898 | goto out; | 885 | goto out; |
| 899 | 886 | ||
| 900 | if (spc_check_dev_wce(dev)) | 887 | if (se_dev_check_wce(dev)) |
| 901 | p[2] = 0x04; /* Write Cache Enable */ | 888 | p[2] = 0x04; /* Write Cache Enable */ |
| 902 | p[12] = 0x20; /* Disabled Read Ahead */ | 889 | p[12] = 0x20; /* Disabled Read Ahead */ |
| 903 | 890 | ||
| @@ -1009,7 +996,7 @@ static sense_reason_t spc_emulate_modesense(struct se_cmd *cmd) | |||
| 1009 | (cmd->se_deve->lun_flags & TRANSPORT_LUNFLAGS_READ_ONLY))) | 996 | (cmd->se_deve->lun_flags & TRANSPORT_LUNFLAGS_READ_ONLY))) |
| 1010 | spc_modesense_write_protect(&buf[length], type); | 997 | spc_modesense_write_protect(&buf[length], type); |
| 1011 | 998 | ||
| 1012 | if ((spc_check_dev_wce(dev)) && | 999 | if ((se_dev_check_wce(dev)) && |
| 1013 | (dev->dev_attrib.emulate_fua_write > 0)) | 1000 | (dev->dev_attrib.emulate_fua_write > 0)) |
| 1014 | spc_modesense_dpofua(&buf[length], type); | 1001 | spc_modesense_dpofua(&buf[length], type); |
| 1015 | 1002 | ||
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 0adc0f650213..ac3cbabdbdf0 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
| @@ -2389,6 +2389,10 @@ int target_get_sess_cmd(struct se_session *se_sess, struct se_cmd *se_cmd, | |||
| 2389 | list_add_tail(&se_cmd->se_cmd_list, &se_sess->sess_cmd_list); | 2389 | list_add_tail(&se_cmd->se_cmd_list, &se_sess->sess_cmd_list); |
| 2390 | out: | 2390 | out: |
| 2391 | spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); | 2391 | spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); |
| 2392 | |||
| 2393 | if (ret && ack_kref) | ||
| 2394 | target_put_sess_cmd(se_sess, se_cmd); | ||
| 2395 | |||
| 2392 | return ret; | 2396 | return ret; |
| 2393 | } | 2397 | } |
| 2394 | EXPORT_SYMBOL(target_get_sess_cmd); | 2398 | EXPORT_SYMBOL(target_get_sess_cmd); |
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c index 97b486c3dda1..583e755d8091 100644 --- a/drivers/target/tcm_fc/tfc_io.c +++ b/drivers/target/tcm_fc/tfc_io.c | |||
| @@ -359,7 +359,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd) | |||
| 359 | ep = fc_seq_exch(seq); | 359 | ep = fc_seq_exch(seq); |
| 360 | if (ep) { | 360 | if (ep) { |
| 361 | lport = ep->lp; | 361 | lport = ep->lp; |
| 362 | if (lport && (ep->xid <= lport->lro_xid)) | 362 | if (lport && (ep->xid <= lport->lro_xid)) { |
| 363 | /* | 363 | /* |
| 364 | * "ddp_done" trigger invalidation of HW | 364 | * "ddp_done" trigger invalidation of HW |
| 365 | * specific DDP context | 365 | * specific DDP context |
| @@ -374,6 +374,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd) | |||
| 374 | * identified using ep->xid) | 374 | * identified using ep->xid) |
| 375 | */ | 375 | */ |
| 376 | cmd->was_ddp_setup = 0; | 376 | cmd->was_ddp_setup = 0; |
| 377 | } | ||
| 377 | } | 378 | } |
| 378 | } | 379 | } |
| 379 | } | 380 | } |
diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadget.c b/drivers/usb/gadget/legacy/tcm_usb_gadget.c index 3a494168661e..6e0a019aad54 100644 --- a/drivers/usb/gadget/legacy/tcm_usb_gadget.c +++ b/drivers/usb/gadget/legacy/tcm_usb_gadget.c | |||
| @@ -1740,10 +1740,9 @@ static int tcm_usbg_make_nexus(struct usbg_tpg *tpg, char *name) | |||
| 1740 | goto err_session; | 1740 | goto err_session; |
| 1741 | } | 1741 | } |
| 1742 | /* | 1742 | /* |
| 1743 | * Now register the TCM vHost virtual I_T Nexus as active with the | 1743 | * Now register the TCM vHost virtual I_T Nexus as active. |
| 1744 | * call to __transport_register_session() | ||
| 1745 | */ | 1744 | */ |
| 1746 | __transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, | 1745 | transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, |
| 1747 | tv_nexus->tvn_se_sess, tv_nexus); | 1746 | tv_nexus->tvn_se_sess, tv_nexus); |
| 1748 | tpg->tpg_nexus = tv_nexus; | 1747 | tpg->tpg_nexus = tv_nexus; |
| 1749 | mutex_unlock(&tpg->tpg_mutex); | 1748 | mutex_unlock(&tpg->tpg_mutex); |
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 8d4f3f1ff799..71df240a467a 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c | |||
| @@ -1956,10 +1956,9 @@ static int vhost_scsi_make_nexus(struct vhost_scsi_tpg *tpg, | |||
| 1956 | goto out; | 1956 | goto out; |
| 1957 | } | 1957 | } |
| 1958 | /* | 1958 | /* |
| 1959 | * Now register the TCM vhost virtual I_T Nexus as active with the | 1959 | * Now register the TCM vhost virtual I_T Nexus as active. |
| 1960 | * call to __transport_register_session() | ||
| 1961 | */ | 1960 | */ |
| 1962 | __transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, | 1961 | transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, |
| 1963 | tv_nexus->tvn_se_sess, tv_nexus); | 1962 | tv_nexus->tvn_se_sess, tv_nexus); |
| 1964 | tpg->tpg_nexus = tv_nexus; | 1963 | tpg->tpg_nexus = tv_nexus; |
| 1965 | 1964 | ||
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index 9faca6a60bb0..42bd55a6c237 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c | |||
| @@ -1659,11 +1659,8 @@ static int scsiback_make_nexus(struct scsiback_tpg *tpg, | |||
| 1659 | name); | 1659 | name); |
| 1660 | goto out; | 1660 | goto out; |
| 1661 | } | 1661 | } |
| 1662 | /* | 1662 | /* Now register the TCM pvscsi virtual I_T Nexus as active. */ |
| 1663 | * Now register the TCM pvscsi virtual I_T Nexus as active with the | 1663 | transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, |
| 1664 | * call to __transport_register_session() | ||
| 1665 | */ | ||
| 1666 | __transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, | ||
| 1667 | tv_nexus->tvn_se_sess, tv_nexus); | 1664 | tv_nexus->tvn_se_sess, tv_nexus); |
| 1668 | tpg->tpg_nexus = tv_nexus; | 1665 | tpg->tpg_nexus = tv_nexus; |
| 1669 | 1666 | ||
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index db81c65b8f48..d61be7297b2c 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
| @@ -111,6 +111,7 @@ void array_free(void *array, int n); | |||
| 111 | void target_core_setup_sub_cits(struct se_subsystem_api *); | 111 | void target_core_setup_sub_cits(struct se_subsystem_api *); |
| 112 | 112 | ||
| 113 | /* attribute helpers from target_core_device.c for backend drivers */ | 113 | /* attribute helpers from target_core_device.c for backend drivers */ |
| 114 | bool se_dev_check_wce(struct se_device *); | ||
| 114 | int se_dev_set_max_unmap_lba_count(struct se_device *, u32); | 115 | int se_dev_set_max_unmap_lba_count(struct se_device *, u32); |
| 115 | int se_dev_set_max_unmap_block_desc_count(struct se_device *, u32); | 116 | int se_dev_set_max_unmap_block_desc_count(struct se_device *, u32); |
| 116 | int se_dev_set_unmap_granularity(struct se_device *, u32); | 117 | int se_dev_set_unmap_granularity(struct se_device *, u32); |
