scst: Clarify dev_pr_mutex source code comments

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4614 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-11-13 02:48:45 +00:00
parent a88ccc6231
commit e2155e10bf
2 changed files with 9 additions and 8 deletions

View File

@@ -80,9 +80,10 @@ struct mutex scst_mutex;
EXPORT_SYMBOL_GPL(scst_mutex);
/*
* Secondary level main mutex, inner for scst_mutex. Needed for
* Second level main mutex, inner to scst_mutex and dev_pr_mutex. Needed for
* __scst_pr_register_all_tg_pt(), since we can't use scst_mutex there,
* because of the circular locking dependency with dev_pr_mutex.
* because its caller already holds dev_pr_mutex, hence circular locking
* dependency is possible.
*/
struct mutex scst_mutex2;

View File

@@ -1212,8 +1212,8 @@ static int scst_pr_register_with_spec_i_pt(struct scst_cmd *cmd,
TRACE_PR("Wildcard iSCSI TransportID %s",
&transport_id[4]);
/*
* We can't use scst_mutex here, because of the
* circular locking dependency with dev_pr_mutex.
* We can't use scst_mutex here because the caller
* already holds dev_pr_mutex.
*/
spin_lock_bh(&dev->dev_lock);
list_for_each_entry(t, &dev->dev_tgt_dev_list,
@@ -1320,8 +1320,8 @@ static void scst_pr_unregister_all_tg_pt(struct scst_device *dev,
TRACE_ENTRY();
/*
* We can't use scst_mutex here, because of the circular locking
* dependency with dev_pr_mutex.
* We can't use scst_mutex here since the caller already holds
* dev_pr_mutex.
*/
mutex_lock(&scst_mutex2);
@@ -1407,8 +1407,8 @@ static int scst_pr_register_all_tg_pt(struct scst_cmd *cmd, uint8_t *buffer,
TRACE_ENTRY();
/*
* We can't use scst_mutex here, because of the circular locking
* dependency with dev_pr_mutex.
* We can't use scst_mutex here because the caller already holds
* dev_pr_mutex.
*/
mutex_lock(&scst_mutex2);