linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maurizio Lombardi <mlombard@redhat.com>
To: Andy Grover <agrover@redhat.com>, target-devel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org, hch@lst.de, nab@linux-iscsi.org
Subject: Re: [PATCHv3 1/8] target: Add locking to some accesses to nacl.device_list
Date: Tue, 01 Jul 2014 10:48:10 +0200	[thread overview]
Message-ID: <53B275CA.50002@redhat.com> (raw)
In-Reply-To: <1404171587-28845-2-git-send-email-agrover@redhat.com>

Hi Andy,

On 07/01/2014 01:39 AM, Andy Grover wrote:
> diff --git a/drivers/target/target_core_ua.c b/drivers/target/target_core_ua.c
> index 101858e..5c9d980 100644
> --- a/drivers/target/target_core_ua.c
> +++ b/drivers/target/target_core_ua.c
> @@ -51,9 +51,12 @@ target_scsi3_ua_check(struct se_cmd *cmd)
>  	if (!nacl)
>  		return 0;
>  
> +	spin_lock_irq(&nacl->device_list_lock);
>  	deve = nacl->device_list[cmd->orig_fe_lun];
>  	if (!atomic_read(&deve->ua_count))
>  		return 0;
> +	spin_unlock_irq(&nacl->device_list_lock);
> +

Shouldn't the spinlock unlocked before the "return 0;" ?

Regards,
Maurizio Lombardi

  reply	other threads:[~2014-07-01  8:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 23:39 [PATCHv3 0/8] target: Save memory on unused se_dev_entrys and se_luns Andy Grover
2014-06-30 23:39 ` [PATCHv3 1/8] target: Add locking to some accesses to nacl.device_list Andy Grover
2014-07-01  8:48   ` Maurizio Lombardi [this message]
2014-07-01 16:15     ` [PATCHv3 9/8] target: Fix return with spinlock held in scsi3_ua_check() Andy Grover
2014-06-30 23:39 ` [PATCHv3 2/8] target: Don't unlock/relock tpg_lun_lock in loop in add_node_to_devs Andy Grover
2014-06-30 23:39 ` [PATCHv3 3/8] target: Allocate se_dev_entrys in device list only when used Andy Grover
2014-06-30 23:39 ` [PATCHv3 4/8] target: core_tpg_post_dellun can return void Andy Grover
2014-06-30 23:39 ` [PATCHv3 5/8] target: Change core_dev_del_lun to take a se_lun instead of unpacked_lun Andy Grover
2014-06-30 23:39 ` [PATCHv3 6/8] target: Allocate se_luns only when used Andy Grover
2014-06-30 23:39 ` [PATCHv3 7/8] target: Remove core_tpg_release_virtual_lun0 function Andy Grover
2014-06-30 23:39 ` [PATCHv3 8/8] target: Refactor core_enable_device_list_for_node Andy Grover
2014-07-29 13:15 ` [PATCHv3 0/8] target: Save memory on unused se_dev_entrys and se_luns Christoph Hellwig
2014-08-22 22:13   ` Andy Grover
2014-09-13 19:55   ` Christoph Hellwig
2014-09-18  7:38     ` Nicholas A. Bellinger
2014-09-18 22:54       ` Andy Grover
2014-09-18 23:17         ` Nicholas A. Bellinger
2014-09-23 17:02           ` Andy Grover

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=53B275CA.50002@redhat.com \
    --to=mlombard@redhat.com \
    --cc=agrover@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).