summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_alua.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-01-25 10:34:53 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-02-04 21:33:08 -0500
commit618baaf7881e4ed25197369505378685b7b7a05d (patch)
treebad396431b82564fa6717e58bb4672e463c75a35 /drivers/target/target_core_alua.c
parentb53655b80cfcf33c0b753cf17dc3d42a97299c2f (diff)
scsi: target/iscsi: Convert comments about locking into runtime checks
Cc: Nicholas Bellinger <nab@linux-iscsi.org> Cc: Mike Christie <mchristi@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_alua.c')
-rw-r--r--drivers/target/target_core_alua.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index 6b0d9beacf90..e09f0cf86bed 100644
--- a/drivers/target/target_core_alua.c
+++ b/drivers/target/target_core_alua.c
@@ -910,9 +910,6 @@ static int core_alua_write_tpg_metadata(
return (ret < 0) ? -EIO : 0;
}
-/*
- * Called with tg_pt_gp->tg_pt_gp_transition_mutex held
- */
static int core_alua_update_tpg_primary_metadata(
struct t10_alua_tg_pt_gp *tg_pt_gp)
{
@@ -921,6 +918,8 @@ static int core_alua_update_tpg_primary_metadata(
char *path;
int len, rc;
+ lockdep_assert_held(&tg_pt_gp->tg_pt_gp_transition_mutex);
+
md_buf = kzalloc(ALUA_MD_BUF_LEN, GFP_KERNEL);
if (!md_buf) {
pr_err("Unable to allocate buf for ALUA metadata\n");