scst: Improve scst_acg_add_lun()

Remove a superfluous INIT_LIST_HEAD() call, add a lockdep_assert_held()
statement and fix an outdated comment.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-10-11 20:20:38 +00:00
parent 7e328da616
commit da0e90f5e3
+2 -2
View File
@@ -4502,7 +4502,7 @@ out:
return res;
}
/* The activity supposed to be suspended and scst_mutex held */
/* The caller must hold scst_mutex. */
int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent,
struct scst_device *dev, uint64_t lun, unsigned int flags,
struct scst_acg_dev **out_acg_dev)
@@ -4515,7 +4515,7 @@ int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent,
TRACE_ENTRY();
INIT_LIST_HEAD(&tmp_tgt_dev_list);
lockdep_assert_held(&scst_mutex);
res = scst_check_dif_compatibility(acg, dev);
if (res != 0)