diff options
author | Christoph Hellwig <hch@lst.de> | 2015-05-03 02:50:52 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-05-30 21:04:20 -0400 |
commit | d588cf8f618d7b316743a0bc99fede20f7a01bb7 (patch) | |
tree | ee81f6056ec9868f83338b67256a9e21044f6f84 /drivers/vhost/scsi.c | |
parent | ee7619f2eb21304dcc846b8dc8f8c3d6cbe11792 (diff) |
target: Fix se_tpg_tfo->tf_subsys regression + remove tf_subsystem
There is just one configfs subsystem in the target code, so we might as
well add two helpers to reference / unreference it from the core code
instead of passing pointers to it around.
This fixes a regression introduced for v4.1-rc1 with commit 9ac8928e6,
where configfs_depend_item() callers using se_tpg_tfo->tf_subsys would
fail, because the assignment from the original target_core_subsystem[]
is no longer happening at target_register_template() time.
(Fix target_core_exit_configfs pointer dereference - Sagi)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/vhost/scsi.c')
-rw-r--r-- | drivers/vhost/scsi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 5e19bb53b3a9..ea32b386797f 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c | |||
@@ -1409,8 +1409,7 @@ vhost_scsi_set_endpoint(struct vhost_scsi *vs, | |||
1409 | * dependency now. | 1409 | * dependency now. |
1410 | */ | 1410 | */ |
1411 | se_tpg = &tpg->se_tpg; | 1411 | se_tpg = &tpg->se_tpg; |
1412 | ret = configfs_depend_item(se_tpg->se_tpg_tfo->tf_subsys, | 1412 | ret = target_depend_item(&se_tpg->tpg_group.cg_item); |
1413 | &se_tpg->tpg_group.cg_item); | ||
1414 | if (ret) { | 1413 | if (ret) { |
1415 | pr_warn("configfs_depend_item() failed: %d\n", ret); | 1414 | pr_warn("configfs_depend_item() failed: %d\n", ret); |
1416 | kfree(vs_tpg); | 1415 | kfree(vs_tpg); |
@@ -1513,8 +1512,7 @@ vhost_scsi_clear_endpoint(struct vhost_scsi *vs, | |||
1513 | * to allow vhost-scsi WWPN se_tpg->tpg_group shutdown to occur. | 1512 | * to allow vhost-scsi WWPN se_tpg->tpg_group shutdown to occur. |
1514 | */ | 1513 | */ |
1515 | se_tpg = &tpg->se_tpg; | 1514 | se_tpg = &tpg->se_tpg; |
1516 | configfs_undepend_item(se_tpg->se_tpg_tfo->tf_subsys, | 1515 | target_undepend_item(&se_tpg->tpg_group.cg_item); |
1517 | &se_tpg->tpg_group.cg_item); | ||
1518 | } | 1516 | } |
1519 | if (match) { | 1517 | if (match) { |
1520 | for (i = 0; i < VHOST_SCSI_MAX_VQ; i++) { | 1518 | for (i = 0; i < VHOST_SCSI_MAX_VQ; i++) { |