[rh7] target: use to_stat_tgt_port() to handle files in scsi_tgt_port/

Submitted by Andrei Vagin on Aug. 9, 2018, 11:40 p.m.

Details

Message ID 1533858014-748757-1-git-send-email-avagin@virtuozzo.com
State New
Series "target: use to_stat_tgt_port() to handle files in scsi_tgt_port/"
Headers show

Commit Message

Andrei Vagin Aug. 9, 2018, 11:40 p.m.
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 08e8e6a..6d39664 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;						\
 									\