From: Christoph Hellwig <hch@lst.de>
To: Andy Grover <agrover@redhat.com>
Cc: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org,
hch@lst.de, nab@linux-iscsi.org
Subject: Re: [PATCHv2 RESENDv2 2/9] target: Don't unlock/relock tpg_lun_lock in loop in add_node_to_devs
Date: Tue, 24 Jun 2014 14:24:48 +0200 [thread overview]
Message-ID: <20140624122448.GA9444@lst.de> (raw)
In-Reply-To: <1403567738-13310-3-git-send-email-agrover@redhat.com>
> - *
> + * Called with tpg_lun_lock held & irqs off
> */
Instead of writing this down the code should assert the pre-conditions, e.g.
assert_spin_locked(&tpg->tpg_lun_lock);
WARN_ON_ONCE(!irqs_disabled());
> if (core_enable_device_list_for_node(lun, lacl, lacl->mapped_lun,
> lun_access, nacl, tpg) < 0)
> - return -EINVAL;
> + {
Wrong brace placement.
Also I can't see that anything ensures disabled irqs here.
next prev parent reply other threads:[~2014-06-24 12:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 23:55 [PATCHv2 RESENDv2 0/9] target: Save memory on unused se_dev_entrys and se_luns Andy Grover
2014-06-23 23:55 ` [PATCHv2 RESENDv2 1/9] target: Add locking to some accesses to nacl.device_list Andy Grover
2014-06-23 23:55 ` [PATCHv2 RESENDv2 2/9] target: Don't unlock/relock tpg_lun_lock in loop in add_node_to_devs Andy Grover
2014-06-24 12:24 ` Christoph Hellwig [this message]
2014-06-23 23:55 ` [PATCHv2 RESENDv2 3/9] target: Allocate se_dev_entrys in device list only when used Andy Grover
2014-06-24 14:48 ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 4/9] target: core_tpg_post_dellun can return void Andy Grover
2014-06-24 12:25 ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 5/9] target: Change core_dev_del_lun to take a se_lun instead of unpacked_lun Andy Grover
2014-06-24 12:26 ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 6/9] target: Rename core_tpg_post_dellun to remove_lun Andy Grover
2014-06-24 12:27 ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 7/9] target: Allocate se_luns only when used Andy Grover
2014-06-24 14:52 ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 8/9] target: Remove core_tpg_release_virtual_lun0 function Andy Grover
2014-06-24 12:27 ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 9/9] target: Refactor core_enable_device_list_for_node 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=20140624122448.GA9444@lst.de \
--to=hch@lst.de \
--cc=agrover@redhat.com \
--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 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.