All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: Bart Van Assche <bart.vanassche@sandisk.com>,
	"Nicholas A. Bellinger" <nab@daterainc.com>,
	target-devel <target-devel@vger.kernel.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Sagi Grimberg <sagig@mellanox.com>,
	Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
	Andy Grover <agrover@redhat.com>,
	Vasu Dev <vasu.dev@linux.intel.com>, Vu Pham <vu@mellanox.com>,
	Nicholas Bellinger <nab@linux-iscsi.org>
Subject: Re: [PATCH-v2 2/4] ib_srpt: Convert acl lookup to modern get_initiator_node_acl usage
Date: Wed, 13 Jan 2016 18:39:20 +0200	[thread overview]
Message-ID: <56967DB8.5000401@dev.mellanox.co.il> (raw)
In-Reply-To: <56941FF6.5090003@sandisk.com>


>
> 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.

  reply	other threads:[~2016-01-13 16:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-10 20:28 [PATCH-v2 0/4] target: Close se_node_acl lookup race Nicholas A. Bellinger
2016-01-10 20:28 ` [PATCH-v2 1/4] tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage Nicholas A. Bellinger
2016-01-11 21:05   ` Bart Van Assche
2016-01-12 15:02   ` Christoph Hellwig
2016-01-13  7:19     ` Nicholas A. Bellinger
2016-01-10 20:28 ` [PATCH-v2 2/4] ib_srpt: " Nicholas A. Bellinger
2016-01-11 21:34   ` Bart Van Assche
2016-01-13 16:39     ` Sagi Grimberg [this message]
2016-01-10 20:28 ` [PATCH-v2 3/4] target: Fix change depth se_session reference usage Nicholas A. Bellinger
2016-01-12 15:07   ` Christoph Hellwig
2016-01-13  7:29     ` Nicholas A. Bellinger
2016-01-13  8:24       ` Christoph Hellwig
2016-01-13  8:56         ` Nicholas A. Bellinger
2016-01-13  8:27   ` Christoph Hellwig
2016-01-13  8:58     ` Nicholas A. Bellinger
2016-01-13 16:45   ` Sagi Grimberg
2016-01-10 20:28 ` [PATCH-v2 4/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl Nicholas A. Bellinger
2016-01-12 15:09   ` Christoph Hellwig
2016-01-13  8:00     ` Nicholas A. Bellinger
2016-01-13  8:15       ` Christoph Hellwig
2016-01-13  8:38         ` Nicholas A. Bellinger
2016-01-13  8:49           ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56967DB8.5000401@dev.mellanox.co.il \
    --to=sagig@dev.mellanox.co.il \
    --cc=agrover@redhat.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@daterainc.com \
    --cc=nab@linux-iscsi.org \
    --cc=sagig@mellanox.com \
    --cc=target-devel@vger.kernel.org \
    --cc=vasu.dev@linux.intel.com \
    --cc=vu@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.