You need to sign in or sign up before continuing.
提交 663d5af7 编写于 作者: D Daniel Wagner 提交者: Jeff Layton

locks: Add lockdep assertion for blocked_lock_lock

Annonate insert, remove and iterate function that we need
blocked_lock_lock held.
Signed-off-by: NDaniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
上级 9b8c8695
...@@ -592,11 +592,15 @@ posix_owner_key(struct file_lock *fl) ...@@ -592,11 +592,15 @@ posix_owner_key(struct file_lock *fl)
static void locks_insert_global_blocked(struct file_lock *waiter) static void locks_insert_global_blocked(struct file_lock *waiter)
{ {
lockdep_assert_held(&blocked_lock_lock);
hash_add(blocked_hash, &waiter->fl_link, posix_owner_key(waiter)); hash_add(blocked_hash, &waiter->fl_link, posix_owner_key(waiter));
} }
static void locks_delete_global_blocked(struct file_lock *waiter) static void locks_delete_global_blocked(struct file_lock *waiter)
{ {
lockdep_assert_held(&blocked_lock_lock);
hash_del(&waiter->fl_link); hash_del(&waiter->fl_link);
} }
...@@ -838,6 +842,8 @@ static int posix_locks_deadlock(struct file_lock *caller_fl, ...@@ -838,6 +842,8 @@ static int posix_locks_deadlock(struct file_lock *caller_fl,
{ {
int i = 0; int i = 0;
lockdep_assert_held(&blocked_lock_lock);
/* /*
* This deadlock detector can't reasonably detect deadlocks with * This deadlock detector can't reasonably detect deadlocks with
* FL_OFDLCK locks, since they aren't owned by a process, per-se. * FL_OFDLCK locks, since they aren't owned by a process, per-se.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册