Re: [PATCH-v2 2/4] ib_srpt: Convert acl lookup to modern get_initiator_node_acl usage

From: Sagi Grimberg
Date: Wed Jan 13 2016 - 11:39:29 EST




The "goto try_again" statement is executed at most once. Since the above loop
can be unfolded with only a very minor code duplication I think it should
be unfolded, e.g. as follows:

se_acl = core_tpg_get_initiator_node_acl(&sport->port_tpg_1, ch->sess_name);
if (!se_acl)
se_acl = core_tpg_get_initiator_node_acl(&sport->port_tpg_1, ch->sess_name + strlen("0x"));
if (!se_acl) {
pr_info("Rejected login because no ACL has been"
" configured yet for initiator %s.\n",
ch->sess_name);
[ ... ]
}


I tend to agree, and it would be a bit cleaner to hide this behind
srpt_get_initiator_node_acl wrapper.