diff options
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_stat.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_stat.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target/iscsi/iscsi_target_stat.c index f1db83077e0a..421d6947dc64 100644 --- a/drivers/target/iscsi/iscsi_target_stat.c +++ b/drivers/target/iscsi/iscsi_target_stat.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/export.h> | 23 | #include <linux/export.h> |
24 | #include <scsi/iscsi_proto.h> | 24 | #include <scsi/iscsi_proto.h> |
25 | #include <target/target_core_base.h> | 25 | #include <target/target_core_base.h> |
26 | #include <target/target_core_transport.h> | ||
27 | #include <target/configfs_macros.h> | 26 | #include <target/configfs_macros.h> |
28 | 27 | ||
29 | #include "iscsi_target_core.h" | 28 | #include "iscsi_target_core.h" |
@@ -746,7 +745,7 @@ static ssize_t iscsi_stat_sess_show_attr_node( | |||
746 | spin_lock_bh(&se_nacl->nacl_sess_lock); | 745 | spin_lock_bh(&se_nacl->nacl_sess_lock); |
747 | se_sess = se_nacl->nacl_sess; | 746 | se_sess = se_nacl->nacl_sess; |
748 | if (se_sess) { | 747 | if (se_sess) { |
749 | sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; | 748 | sess = se_sess->fabric_sess_ptr; |
750 | if (sess) | 749 | if (sess) |
751 | ret = snprintf(page, PAGE_SIZE, "%u\n", | 750 | ret = snprintf(page, PAGE_SIZE, "%u\n", |
752 | sess->sess_ops->SessionType ? 0 : ISCSI_NODE_INDEX); | 751 | sess->sess_ops->SessionType ? 0 : ISCSI_NODE_INDEX); |
@@ -770,7 +769,7 @@ static ssize_t iscsi_stat_sess_show_attr_indx( | |||
770 | spin_lock_bh(&se_nacl->nacl_sess_lock); | 769 | spin_lock_bh(&se_nacl->nacl_sess_lock); |
771 | se_sess = se_nacl->nacl_sess; | 770 | se_sess = se_nacl->nacl_sess; |
772 | if (se_sess) { | 771 | if (se_sess) { |
773 | sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; | 772 | sess = se_sess->fabric_sess_ptr; |
774 | if (sess) | 773 | if (sess) |
775 | ret = snprintf(page, PAGE_SIZE, "%u\n", | 774 | ret = snprintf(page, PAGE_SIZE, "%u\n", |
776 | sess->session_index); | 775 | sess->session_index); |
@@ -794,7 +793,7 @@ static ssize_t iscsi_stat_sess_show_attr_cmd_pdus( | |||
794 | spin_lock_bh(&se_nacl->nacl_sess_lock); | 793 | spin_lock_bh(&se_nacl->nacl_sess_lock); |
795 | se_sess = se_nacl->nacl_sess; | 794 | se_sess = se_nacl->nacl_sess; |
796 | if (se_sess) { | 795 | if (se_sess) { |
797 | sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; | 796 | sess = se_sess->fabric_sess_ptr; |
798 | if (sess) | 797 | if (sess) |
799 | ret = snprintf(page, PAGE_SIZE, "%u\n", sess->cmd_pdus); | 798 | ret = snprintf(page, PAGE_SIZE, "%u\n", sess->cmd_pdus); |
800 | } | 799 | } |
@@ -817,7 +816,7 @@ static ssize_t iscsi_stat_sess_show_attr_rsp_pdus( | |||
817 | spin_lock_bh(&se_nacl->nacl_sess_lock); | 816 | spin_lock_bh(&se_nacl->nacl_sess_lock); |
818 | se_sess = se_nacl->nacl_sess; | 817 | se_sess = se_nacl->nacl_sess; |
819 | if (se_sess) { | 818 | if (se_sess) { |
820 | sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; | 819 | sess = se_sess->fabric_sess_ptr; |
821 | if (sess) | 820 | if (sess) |
822 | ret = snprintf(page, PAGE_SIZE, "%u\n", sess->rsp_pdus); | 821 | ret = snprintf(page, PAGE_SIZE, "%u\n", sess->rsp_pdus); |
823 | } | 822 | } |
@@ -840,7 +839,7 @@ static ssize_t iscsi_stat_sess_show_attr_txdata_octs( | |||
840 | spin_lock_bh(&se_nacl->nacl_sess_lock); | 839 | spin_lock_bh(&se_nacl->nacl_sess_lock); |
841 | se_sess = se_nacl->nacl_sess; | 840 | se_sess = se_nacl->nacl_sess; |
842 | if (se_sess) { | 841 | if (se_sess) { |
843 | sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; | 842 | sess = se_sess->fabric_sess_ptr; |
844 | if (sess) | 843 | if (sess) |
845 | ret = snprintf(page, PAGE_SIZE, "%llu\n", | 844 | ret = snprintf(page, PAGE_SIZE, "%llu\n", |
846 | (unsigned long long)sess->tx_data_octets); | 845 | (unsigned long long)sess->tx_data_octets); |
@@ -864,7 +863,7 @@ static ssize_t iscsi_stat_sess_show_attr_rxdata_octs( | |||
864 | spin_lock_bh(&se_nacl->nacl_sess_lock); | 863 | spin_lock_bh(&se_nacl->nacl_sess_lock); |
865 | se_sess = se_nacl->nacl_sess; | 864 | se_sess = se_nacl->nacl_sess; |
866 | if (se_sess) { | 865 | if (se_sess) { |
867 | sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; | 866 | sess = se_sess->fabric_sess_ptr; |
868 | if (sess) | 867 | if (sess) |
869 | ret = snprintf(page, PAGE_SIZE, "%llu\n", | 868 | ret = snprintf(page, PAGE_SIZE, "%llu\n", |
870 | (unsigned long long)sess->rx_data_octets); | 869 | (unsigned long long)sess->rx_data_octets); |
@@ -888,7 +887,7 @@ static ssize_t iscsi_stat_sess_show_attr_conn_digest_errors( | |||
888 | spin_lock_bh(&se_nacl->nacl_sess_lock); | 887 | spin_lock_bh(&se_nacl->nacl_sess_lock); |
889 | se_sess = se_nacl->nacl_sess; | 888 | se_sess = se_nacl->nacl_sess; |
890 | if (se_sess) { | 889 | if (se_sess) { |
891 | sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; | 890 | sess = se_sess->fabric_sess_ptr; |
892 | if (sess) | 891 | if (sess) |
893 | ret = snprintf(page, PAGE_SIZE, "%u\n", | 892 | ret = snprintf(page, PAGE_SIZE, "%u\n", |
894 | sess->conn_digest_errors); | 893 | sess->conn_digest_errors); |
@@ -912,7 +911,7 @@ static ssize_t iscsi_stat_sess_show_attr_conn_timeout_errors( | |||
912 | spin_lock_bh(&se_nacl->nacl_sess_lock); | 911 | spin_lock_bh(&se_nacl->nacl_sess_lock); |
913 | se_sess = se_nacl->nacl_sess; | 912 | se_sess = se_nacl->nacl_sess; |
914 | if (se_sess) { | 913 | if (se_sess) { |
915 | sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; | 914 | sess = se_sess->fabric_sess_ptr; |
916 | if (sess) | 915 | if (sess) |
917 | ret = snprintf(page, PAGE_SIZE, "%u\n", | 916 | ret = snprintf(page, PAGE_SIZE, "%u\n", |
918 | sess->conn_timeout_errors); | 917 | sess->conn_timeout_errors); |