diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2016-08-31 15:17:04 -0700 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-09-14 13:56:38 -0400 |
commit | 5a8f1f80e9dca791ee240213477df99e88258073 (patch) | |
tree | 7207d5cb0a8c5f9f7db7cd3956c4c9c1ebcb145e /drivers/md/dm.c | |
parent | c533f249a166142df4294ec38fa5dcd1903f0400 (diff) | |
download | linux-5a8f1f80e9dca791ee240213477df99e88258073.tar.bz2 |
dm: add two lockdep_assert_held() statements
Document the locking assumptions for the __bind() and __dm_suspend()
functions.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 0f2928b3136b..0708c620c17a 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1648,6 +1648,8 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t, struct request_queue *q = md->queue; sector_t size; + lockdep_assert_held(&md->suspend_lock); + size = dm_table_get_size(t); /* @@ -2094,6 +2096,8 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map, bool noflush = suspend_flags & DM_SUSPEND_NOFLUSH_FLAG; int r; + lockdep_assert_held(&md->suspend_lock); + /* * DMF_NOFLUSH_SUSPENDING must be set before presuspend. * This flag is cleared before dm_suspend returns. |