diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-12-15 20:04:31 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-12-15 20:04:31 -0800 |
commit | 9cf8bd529c6ba81402ebf6b7a56307b0787e4f93 (patch) | |
tree | f53a27f54dbdec467905608fa1585a3e5b7b6e67 /drivers/nvdimm/region_devs.c | |
parent | af7d9f0c57941b465043681cb5c3410f7f3f1a41 (diff) | |
download | lwn-9cf8bd529c6ba81402ebf6b7a56307b0787e4f93.tar.gz lwn-9cf8bd529c6ba81402ebf6b7a56307b0787e4f93.zip |
libnvdimm: replace mutex_is_locked() warnings with lockdep_assert_held
For warnings that should only ever trigger during development and
testing replace WARN statements with lockdep_assert_held. The lockdep
pattern is prevalent, and these paths are are well covered by libnvdimm
unit tests.
Reported-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/region_devs.c')
-rw-r--r-- | drivers/nvdimm/region_devs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index 6af5e629140c..7cd705f3247c 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -509,7 +509,7 @@ void nd_mapping_free_labels(struct nd_mapping *nd_mapping) { struct nd_label_ent *label_ent, *e; - WARN_ON(!mutex_is_locked(&nd_mapping->lock)); + lockdep_assert_held(&nd_mapping->lock); list_for_each_entry_safe(label_ent, e, &nd_mapping->labels, list) { list_del(&label_ent->list); kfree(label_ent); |