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

Andrei Vagin avagin at virtuozzo.com
Fri Aug 10 02:40:14 MSK 2018


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 at virtuozzo.com>
---
 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 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;						\
 									\
-- 
1.8.3.1



More information about the Devel mailing list