diff options
author | Andy Grover <agrover@redhat.com> | 2013-10-09 14:05:57 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-10-16 16:38:09 -0400 |
commit | b7eec2cdd874ad678228a32a31dea32e3fcc2f99 (patch) | |
tree | f7219e52d84e1bdf10856f9add41bb3dda639595 /drivers/target/iscsi/iscsi_target_configfs.c | |
parent | d80e224dd52dfc448e820aefa5f86c441ab76e1a (diff) |
target/iscsi: Remove iscsi dereferencing macros
These are all straightforward.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_configfs.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_configfs.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index c2d504425da6..59a0241a016d 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c | |||
@@ -372,7 +372,7 @@ static ssize_t iscsi_nacl_attrib_show_##name( \ | |||
372 | struct iscsi_node_acl *nacl = container_of(se_nacl, struct iscsi_node_acl, \ | 372 | struct iscsi_node_acl *nacl = container_of(se_nacl, struct iscsi_node_acl, \ |
373 | se_node_acl); \ | 373 | se_node_acl); \ |
374 | \ | 374 | \ |
375 | return sprintf(page, "%u\n", ISCSI_NODE_ATTRIB(nacl)->name); \ | 375 | return sprintf(page, "%u\n", nacl->node_attrib.name); \ |
376 | } \ | 376 | } \ |
377 | \ | 377 | \ |
378 | static ssize_t iscsi_nacl_attrib_store_##name( \ | 378 | static ssize_t iscsi_nacl_attrib_store_##name( \ |
@@ -897,7 +897,7 @@ static struct se_node_acl *lio_target_make_nodeacl( | |||
897 | if (!se_nacl_new) | 897 | if (!se_nacl_new) |
898 | return ERR_PTR(-ENOMEM); | 898 | return ERR_PTR(-ENOMEM); |
899 | 899 | ||
900 | cmdsn_depth = ISCSI_TPG_ATTRIB(tpg)->default_cmdsn_depth; | 900 | cmdsn_depth = tpg->tpg_attrib.default_cmdsn_depth; |
901 | /* | 901 | /* |
902 | * se_nacl_new may be released by core_tpg_add_initiator_node_acl() | 902 | * se_nacl_new may be released by core_tpg_add_initiator_node_acl() |
903 | * when converting a NdoeACL from demo mode -> explict | 903 | * when converting a NdoeACL from demo mode -> explict |
@@ -920,9 +920,9 @@ static struct se_node_acl *lio_target_make_nodeacl( | |||
920 | return ERR_PTR(-ENOMEM); | 920 | return ERR_PTR(-ENOMEM); |
921 | } | 921 | } |
922 | 922 | ||
923 | stats_cg->default_groups[0] = &NODE_STAT_GRPS(acl)->iscsi_sess_stats_group; | 923 | stats_cg->default_groups[0] = &acl->node_stat_grps.iscsi_sess_stats_group; |
924 | stats_cg->default_groups[1] = NULL; | 924 | stats_cg->default_groups[1] = NULL; |
925 | config_group_init_type_name(&NODE_STAT_GRPS(acl)->iscsi_sess_stats_group, | 925 | config_group_init_type_name(&acl->node_stat_grps.iscsi_sess_stats_group, |
926 | "iscsi_sess_stats", &iscsi_stat_sess_cit); | 926 | "iscsi_sess_stats", &iscsi_stat_sess_cit); |
927 | 927 | ||
928 | return se_nacl; | 928 | return se_nacl; |
@@ -967,7 +967,7 @@ static ssize_t iscsi_tpg_attrib_show_##name( \ | |||
967 | if (iscsit_get_tpg(tpg) < 0) \ | 967 | if (iscsit_get_tpg(tpg) < 0) \ |
968 | return -EINVAL; \ | 968 | return -EINVAL; \ |
969 | \ | 969 | \ |
970 | rb = sprintf(page, "%u\n", ISCSI_TPG_ATTRIB(tpg)->name); \ | 970 | rb = sprintf(page, "%u\n", tpg->tpg_attrib.name); \ |
971 | iscsit_put_tpg(tpg); \ | 971 | iscsit_put_tpg(tpg); \ |
972 | return rb; \ | 972 | return rb; \ |
973 | } \ | 973 | } \ |
@@ -1514,21 +1514,21 @@ static struct se_wwn *lio_target_call_coreaddtiqn( | |||
1514 | return ERR_PTR(-ENOMEM); | 1514 | return ERR_PTR(-ENOMEM); |
1515 | } | 1515 | } |
1516 | 1516 | ||
1517 | stats_cg->default_groups[0] = &WWN_STAT_GRPS(tiqn)->iscsi_instance_group; | 1517 | stats_cg->default_groups[0] = &tiqn->tiqn_stat_grps.iscsi_instance_group; |
1518 | stats_cg->default_groups[1] = &WWN_STAT_GRPS(tiqn)->iscsi_sess_err_group; | 1518 | stats_cg->default_groups[1] = &tiqn->tiqn_stat_grps.iscsi_sess_err_group; |
1519 | stats_cg->default_groups[2] = &WWN_STAT_GRPS(tiqn)->iscsi_tgt_attr_group; | 1519 | stats_cg->default_groups[2] = &tiqn->tiqn_stat_grps.iscsi_tgt_attr_group; |
1520 | stats_cg->default_groups[3] = &WWN_STAT_GRPS(tiqn)->iscsi_login_stats_group; | 1520 | stats_cg->default_groups[3] = &tiqn->tiqn_stat_grps.iscsi_login_stats_group; |
1521 | stats_cg->default_groups[4] = &WWN_STAT_GRPS(tiqn)->iscsi_logout_stats_group; | 1521 | stats_cg->default_groups[4] = &tiqn->tiqn_stat_grps.iscsi_logout_stats_group; |
1522 | stats_cg->default_groups[5] = NULL; | 1522 | stats_cg->default_groups[5] = NULL; |
1523 | config_group_init_type_name(&WWN_STAT_GRPS(tiqn)->iscsi_instance_group, | 1523 | config_group_init_type_name(&tiqn->tiqn_stat_grps.iscsi_instance_group, |
1524 | "iscsi_instance", &iscsi_stat_instance_cit); | 1524 | "iscsi_instance", &iscsi_stat_instance_cit); |
1525 | config_group_init_type_name(&WWN_STAT_GRPS(tiqn)->iscsi_sess_err_group, | 1525 | config_group_init_type_name(&tiqn->tiqn_stat_grps.iscsi_sess_err_group, |
1526 | "iscsi_sess_err", &iscsi_stat_sess_err_cit); | 1526 | "iscsi_sess_err", &iscsi_stat_sess_err_cit); |
1527 | config_group_init_type_name(&WWN_STAT_GRPS(tiqn)->iscsi_tgt_attr_group, | 1527 | config_group_init_type_name(&tiqn->tiqn_stat_grps.iscsi_tgt_attr_group, |
1528 | "iscsi_tgt_attr", &iscsi_stat_tgt_attr_cit); | 1528 | "iscsi_tgt_attr", &iscsi_stat_tgt_attr_cit); |
1529 | config_group_init_type_name(&WWN_STAT_GRPS(tiqn)->iscsi_login_stats_group, | 1529 | config_group_init_type_name(&tiqn->tiqn_stat_grps.iscsi_login_stats_group, |
1530 | "iscsi_login_stats", &iscsi_stat_login_cit); | 1530 | "iscsi_login_stats", &iscsi_stat_login_cit); |
1531 | config_group_init_type_name(&WWN_STAT_GRPS(tiqn)->iscsi_logout_stats_group, | 1531 | config_group_init_type_name(&tiqn->tiqn_stat_grps.iscsi_logout_stats_group, |
1532 | "iscsi_logout_stats", &iscsi_stat_logout_cit); | 1532 | "iscsi_logout_stats", &iscsi_stat_logout_cit); |
1533 | 1533 | ||
1534 | pr_debug("LIO_Target_ConfigFS: REGISTER -> %s\n", tiqn->tiqn); | 1534 | pr_debug("LIO_Target_ConfigFS: REGISTER -> %s\n", tiqn->tiqn); |
@@ -1815,21 +1815,21 @@ static u32 lio_tpg_get_default_depth(struct se_portal_group *se_tpg) | |||
1815 | { | 1815 | { |
1816 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; | 1816 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; |
1817 | 1817 | ||
1818 | return ISCSI_TPG_ATTRIB(tpg)->default_cmdsn_depth; | 1818 | return tpg->tpg_attrib.default_cmdsn_depth; |
1819 | } | 1819 | } |
1820 | 1820 | ||
1821 | static int lio_tpg_check_demo_mode(struct se_portal_group *se_tpg) | 1821 | static int lio_tpg_check_demo_mode(struct se_portal_group *se_tpg) |
1822 | { | 1822 | { |
1823 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; | 1823 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; |
1824 | 1824 | ||
1825 | return ISCSI_TPG_ATTRIB(tpg)->generate_node_acls; | 1825 | return tpg->tpg_attrib.generate_node_acls; |
1826 | } | 1826 | } |
1827 | 1827 | ||
1828 | static int lio_tpg_check_demo_mode_cache(struct se_portal_group *se_tpg) | 1828 | static int lio_tpg_check_demo_mode_cache(struct se_portal_group *se_tpg) |
1829 | { | 1829 | { |
1830 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; | 1830 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; |
1831 | 1831 | ||
1832 | return ISCSI_TPG_ATTRIB(tpg)->cache_dynamic_acls; | 1832 | return tpg->tpg_attrib.cache_dynamic_acls; |
1833 | } | 1833 | } |
1834 | 1834 | ||
1835 | static int lio_tpg_check_demo_mode_write_protect( | 1835 | static int lio_tpg_check_demo_mode_write_protect( |
@@ -1837,7 +1837,7 @@ static int lio_tpg_check_demo_mode_write_protect( | |||
1837 | { | 1837 | { |
1838 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; | 1838 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; |
1839 | 1839 | ||
1840 | return ISCSI_TPG_ATTRIB(tpg)->demo_mode_write_protect; | 1840 | return tpg->tpg_attrib.demo_mode_write_protect; |
1841 | } | 1841 | } |
1842 | 1842 | ||
1843 | static int lio_tpg_check_prod_mode_write_protect( | 1843 | static int lio_tpg_check_prod_mode_write_protect( |
@@ -1845,7 +1845,7 @@ static int lio_tpg_check_prod_mode_write_protect( | |||
1845 | { | 1845 | { |
1846 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; | 1846 | struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; |
1847 | 1847 | ||
1848 | return ISCSI_TPG_ATTRIB(tpg)->prod_mode_write_protect; | 1848 | return tpg->tpg_attrib.prod_mode_write_protect; |
1849 | } | 1849 | } |
1850 | 1850 | ||
1851 | static void lio_tpg_release_fabric_acl( | 1851 | static void lio_tpg_release_fabric_acl( |
@@ -1909,7 +1909,7 @@ static void lio_set_default_node_attributes(struct se_node_acl *se_acl) | |||
1909 | struct iscsi_node_acl *acl = container_of(se_acl, struct iscsi_node_acl, | 1909 | struct iscsi_node_acl *acl = container_of(se_acl, struct iscsi_node_acl, |
1910 | se_node_acl); | 1910 | se_node_acl); |
1911 | 1911 | ||
1912 | ISCSI_NODE_ATTRIB(acl)->nacl = acl; | 1912 | acl->node_attrib.nacl = acl; |
1913 | iscsit_set_default_node_attribues(acl); | 1913 | iscsit_set_default_node_attribues(acl); |
1914 | } | 1914 | } |
1915 | 1915 | ||