• Andreas Gruenbacher's avatar
    gfs2: Fix up gfs2_glock_async_wait · bdff777c
    Andreas Gruenbacher authored
    Since commit 1fc05c8d
    
     ("gfs2: cancel timed-out glock requests"), a
    pending locking request can be canceled by calling gfs2_glock_dq() on
    the pending holder.  In gfs2_glock_async_wait(), when we time out, use
    that to cancel the remaining locking requests and dequeue the locking
    requests already granted.  That's simpler as well as more efficient than
    waiting for all locking requests to eventually be granted and dequeuing
    them then.
    
    In addition, gfs2_glock_async_wait() promises that by the time the
    function completes, all glocks are either granted or dequeued, but the
    implementation doesn't keep that promise if individual locking requests
    fail.  Fix that as well.
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    bdff777c
glock.c 71.3 KB