diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-12-16 05:04:31 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-12-16 05:04:31 +0100 |
commit | 9cf8bd529c6ba81402ebf6b7a56307b0787e4f93 (patch) | |
tree | f53a27f54dbdec467905608fa1585a3e5b7b6e67 /drivers/nvdimm/namespace_devs.c | |
parent | libnvdimm, pfn: fix align attribute (diff) | |
download | linux-9cf8bd529c6ba81402ebf6b7a56307b0787e4f93.tar.xz linux-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/namespace_devs.c')
-rw-r--r-- | drivers/nvdimm/namespace_devs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index 8817f8a0cf38..de5809a88512 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -1653,7 +1653,7 @@ static int select_pmem_id(struct nd_region *nd_region, u8 *pmem_id) u64 hw_start, hw_end, pmem_start, pmem_end; struct nd_label_ent *label_ent; - WARN_ON(!mutex_is_locked(&nd_mapping->lock)); + lockdep_assert_held(&nd_mapping->lock); list_for_each_entry(label_ent, &nd_mapping->labels, list) { nd_label = label_ent->label; if (!nd_label) |