• David Howells's avatar
    afs: Fix lock-wait/callback-break double locking · c7226e40
    David Howells authored
    __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>
    c7226e40
callback.c 7.75 KB