[RHEL7,COMMIT] target: use to_stat_tgt_port() to handle files in scsi_tgt_port/

Submitted by Konstantin Khorenko on Aug. 13, 2018, 11:44 a.m.

Details

Message ID 201808131144.w7DBieYG029260@finist_ce7.work
State New
Series "target: use to_stat_tgt_port() to handle files in scsi_tgt_port/"
Headers show

Commit Message

Konstantin Khorenko Aug. 13, 2018, 11:44 a.m.
The commit is pushed to "branch-rh7-3.10.0-862.9.1.vz7.70.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.9.1.vz7.70.2
------>
commit 486fe98d010a828c0bb87af764837802fdc708c3
Author: Andrei Vagin <avagin@virtuozzo.com>
Date:   Mon Aug 13 14:44:40 2018 +0300

    target: use to_stat_tgt_port() to handle files in scsi_tgt_port/
    
    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 <avagin@virtuozzo.com>
---
 drivers/target/target_core_stat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c
index 08e8e6ac33e4..6d396644f814 100644
--- a/drivers/target/target_core_stat.c
+++ b/drivers/target/target_core_stat.c
@@ -547,7 +547,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);				\
@@ -564,7 +564,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;							\
 									\
@@ -897,7 +897,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;						\
 									\