From: Andrei Vagin <[email protected]> Currently we use to_stat_port(), but it has to be used only for files in scsi_port/.
https://pmc.acronis.com/browse/VSTOR-13021 Signed-off-by: Andrei Vagin <[email protected]> (cherry picked from commit 3de1aee7ed19aff5a1ce4e12aa356aa3db8bc2df) VZ 8 rebase part https://jira.sw.ru/browse/PSBM-127837 Signed-off-by: Alexander Mikhalitsyn <[email protected]> --- drivers/target/target_core_stat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c index abe7f612b676..8d0f4f75829a 100644 --- a/drivers/target/target_core_stat.c +++ b/drivers/target/target_core_stat.c @@ -544,7 +544,7 @@ static ssize_t target_stat_tgt_port_##_name##_show( \ { \ ssize_t size = -ENODEV; \ struct se_device *dev; \ - struct se_lun *lun = to_stat_port(item); \ + struct se_lun *lun = to_stat_tgt_port(item); \ \ rcu_read_lock(); \ dev = rcu_dereference(lun->lun_se_dev); \ @@ -561,7 +561,7 @@ static ssize_t target_stat_tgt_port_##_name##_store( \ struct config_item *item, const char *page, size_t size) \ { \ struct se_device *dev; \ - struct se_lun *lun = to_stat_port(item); \ + struct se_lun *lun = to_stat_tgt_port(item); \ struct scsi_port_stats_hist *old, *new; \ ssize_t ret; \ \ @@ -894,7 +894,7 @@ static ssize_t target_stat_tgt_port_hs_in_cmds_show(struct config_item *item, static ssize_t target_stat_tgt_port_##_name##_show( \ struct config_item *item, char *page) \ { \ - struct se_lun *lun = to_stat_port(item); \ + struct se_lun *lun = to_stat_tgt_port(item); \ struct se_device *dev; \ ssize_t ret = -ENODEV; \ \ -- 2.28.0 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
