diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-04-27 19:11:22 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-04-27 23:08:43 +0200 |
commit | b194679fac3067e785f432109c69759aa75b038c (patch) | |
tree | f650ebbced17f5f826238822d732d9eb99d04f7f /drivers/md/dm-mpath.c | |
parent | dm: verify suspend_locking assumptions at runtime (diff) | |
download | linux-b194679fac3067e785f432109c69759aa75b038c.tar.xz linux-b194679fac3067e785f432109c69759aa75b038c.zip |
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: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index d85baffa3377..730ec0be1afa 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -298,6 +298,8 @@ static int __pg_init_all_paths(struct multipath *m) struct pgpath *pgpath; 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)) return 0; |