From da0e90f5e3e13a95608d80f4f19f4ba5f07a933a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 11 Oct 2021 20:20:38 +0000 Subject: [PATCH] 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 --- scst/src/scst_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index c5a3c632f..62997f980 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -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)