提交 b194679f 编写于 作者: B Bart Van Assche 提交者: Mike Snitzer

dm mpath: verify __pg_init_all_paths locking assumptions at runtime

Verify at runtime that __pg_init_all_paths() is called with
multipath.lock held if lockdep is enabled.
Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: NHannes Reinecke <hare@suse.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 1ea0654e
...@@ -298,6 +298,8 @@ static int __pg_init_all_paths(struct multipath *m) ...@@ -298,6 +298,8 @@ static int __pg_init_all_paths(struct multipath *m)
struct pgpath *pgpath; struct pgpath *pgpath;
unsigned long pg_init_delay = 0; unsigned long pg_init_delay = 0;
lockdep_assert_held(&m->lock);
if (atomic_read(&m->pg_init_in_progress) || test_bit(MPATHF_PG_INIT_DISABLED, &m->flags)) if (atomic_read(&m->pg_init_in_progress) || test_bit(MPATHF_PG_INIT_DISABLED, &m->flags))
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册