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

dm: add two lockdep_assert_held() statements

Document the locking assumptions for the __bind() and __dm_suspend()
functions.
Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 c533f249
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册