Skip to content
Commit c7226e40 authored by David Howells's avatar David Howells
Browse files

afs: Fix lock-wait/callback-break double locking



__afs_break_callback() holds vnode->lock around its call of
afs_lock_may_be_available() - which also takes that lock.

Fix this by not taking the lock in __afs_break_callback().

Also, there's no point checking the granted_locks and pending_locks queues;
it's sufficient to check lock_state, so move that check out of
afs_lock_may_be_available() into __afs_break_callback() to replace the
queue checks.

Fixes: e8d6c554 ("AFS: implement file locking")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent d9052dda
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment